Our forum migration to Discourse is underway and scheduled to last through June 21. During the migration, the forums will be read-only, except for a single temporary forum (contents of which will not be getting transferred). Read our announcement post for more information about the forum migration.
Hey folks, there is a new Podcast category for forums https://forums.plex.tv/categories/podcasts
If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

Plex server stops responding after about 6 hours

hossmanhossman Members, Plex Pass Posts: 5 Plex Pass

Over the last few days my plex server will be running and then stop responding after about 6 hours. the web interface will stop displaying library info, when I go to the server tab it will state that info is unavailable. eventually the whole web site will stop responding. The service still indicates that it is running. If I happen to be watching a video when this starts the video playback will continue but once I stop it I can no longer browse or restart. The only think that happened prior to this was a power outage that caused the server to shutdown once the UPS batteries had been depleted. I've updated to the latest version but still experience the issue.

Best Answer

  • ChuckPAChuckPA Members, Plex Pass, Plex Ninja, Plex Team Member Posts: 22,850 Plex Team Member
    Accepted Answer

    Thank you for the updated logs.

    I found a major, possible the root, contributor to your problem.

    Dec 31, 2017 10:16:54.937 [0x7f2dce3f8700] DEBUG - [com.plexapp.system] HTTP reply status 200, with 61162 bytes of content.
    Dec 31, 2017 10:16:54.943 [0x7f2dca3ff700] WARN - SLOW QUERY: It took 330.000000 ms to retrieve 0 items.
    Dec 31, 2017 10:16:54.943 [0x7f2dca3ff700] DEBUG - DVR:Subscription: Episode 'Bird Brain' airs on channel 15 at 2017-12-30 16:00:00
    

    Due to the amount of media you've loaded (Photos count), the database has become fragmented.

    I therefore recommend manually optimizing the database (Hover over Libraries, expose the elllipsis, click it, click Optimize Database)
    I also suggest you verify the database is optimized during schedule maintenance. If your system is turned off during that time, I suggest you find a time when it will be on.

    Settings - Server - Scheduled Tasks.

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility

     Reporting Plex Server issues | Plex Media Server FAQ | Linux Tips

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements

    Hosts: Fedora, QNAP, Synology, most Linux distros in VM

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     

Answers

  • ChuckPAChuckPA Members, Plex Pass, Plex Ninja, Plex Team Member Posts: 22,850 Plex Team Member

    Can you grab the logs for me ?

    The closer those logs are to an actual failure/ outage is the most helpful.

    Settings - Server - help - download logs (that ZIP file) is best

    Also, Debug level logging (settings -serevr - general) is all I need

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility

     Reporting Plex Server issues | Plex Media Server FAQ | Linux Tips

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements

    Hosts: Fedora, QNAP, Synology, most Linux distros in VM

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • hossmanhossman Members, Plex Pass Posts: 5 Plex Pass

    Here are the log files I extracted after restarting the service. Unfortunately verbose logging was already turned on. So far it has been up 18 hours since the last service restart.

  • ChuckPAChuckPA Members, Plex Pass, Plex Ninja, Plex Team Member Posts: 22,850 Plex Team Member

    Thank you for the logs.

    For future reference: Please turn off Verbose Logging until specifically requested. It makes debugging much more difficult as well as being so verbose that a great deal of information is usually lost.

    In this particular capture, a lot of data was lost as well.

    I did find:

    Dec 29, 2017 18:23:14.607 [0x7f30393fe700] ERROR - Error opening file '/mnt/plex/Movies/Madagascar 3 Europe's Most Wanted (2012).m4v' - No such file or directory (2)

    I also found what looks like a commanded stop. Does this time match when you told it to stop?

    Dec 29, 2017 20:30:19.976 [0x7f304dffa700] DEBUG - NetworkInterface: Notified of network changed (force=0)
    Dec 29, 2017 20:30:19.976 [0x7f304dffa700] DEBUG - Network change notification but nothing changed.
    Dec 29, 2017 20:33:08.453 [0x7f304f7fd700] DEBUG - NetworkServiceBrowser: PLAYER departed after not being seen for 181.934886 seconds: 192.168.12.221
    Dec 29, 2017 20:46:32.936 [0x7f306a3e6800] DEBUG - Shutting down with signal 15
    Dec 29, 2017 20:46:32.936 [0x7f306a3e6800] DEBUG - Ordered to stop server.
    Dec 29, 2017 20:46:33.013 [0x7f305d3fc700] VERBOSE - JobManager: child process with PID 2758 exited
    Dec 29, 2017 20:46:33.013 [0x7f305d3fc700] DEBUG - JobManager: child process killed by signal: 15 (Terminated)
    Dec 29, 2017 20:46:33.079 [0x7f304c7fe700] DEBUG - Plex DLNA Server exited.
    Dec 29, 2017 20:46:33.179 [0x7f304c7fe700] DEBUG - JobRunner: exec of /usr/lib/plexmediaserver/Plex DLNA Server cancelled. In shutdown state.
    Dec 29, 2017 20:46:33.179 [0x7f304c7fe700] ERROR - Plex DLNA Server failed to start
    Dec 29, 2017 20:46:33.190 [0x7f305d3fc700] VERBOSE - JobManager: child process with PID 2662 exited
    Dec 29, 2017 20:46:33.243 [0x7f306a3e6800] WARN - Timed out waiting for server to finish.
    Dec 29, 2017 20:46:33.243 [0x7f306a3e6800] DEBUG - Stopping server...
    Dec 29, 2017 20:46:33.243 [0x7f306a3e6800] DEBUG - HttpServer: Stopping server.
    Dec 29, 2017 20:46:34.243 [0x7f306a3e6800] WARN - Timed out waiting for server to finish.
    Dec 29, 2017 20:46:34.243 [0x7f306a3e6800] DEBUG - Server stopped.
    Dec 29, 2017 20:46:34.259 [0x7f306a3e6800] DEBUG - NetworkService: Stopping advertisement.
    Dec 29, 2017 20:46:34.320 [0x7f306a3e6800] DEBUG - Killing plug-ins.
    Dec 29, 2017 20:46:34.332 [0x7f306a3e6800] DEBUG - [com.plexapp.system] Killing.
    Dec 29, 2017 20:46:34.363 [0x7f306a3e6800] DEBUG - Waiting for Plex Tuner Service to exit.
    Dec 29, 2017 20:46:34.453 [0x7f305d3fc700] VERBOSE - JobManager: child process with PID 2762 exited
    Dec 29, 2017 20:46:34.453 [0x7f304bffd700] DEBUG - Plex Tuner Service exited.
    Dec 29, 2017 20:46:34.479 [0x7f306a3e6800] INFO - Killing process: Plex Relay (pid: 1981)
    Dec 29, 2017 20:46:34.479 [0x7f305d3fc700] VERBOSE - JobManager: child process with PID 1981 exited
    Dec 29, 2017 20:46:34.479 [0x7f305d3fc700] DEBUG - JobManager: child process killed by signal: 9 (Killed)
    Dec 29, 2017 20:46:34.517 [0x7f306a3e6800] DEBUG - Job was already killed, not killing again.
    Dec 29, 2017 20:46:34.535 [0x7f306a3e6800] DEBUG - Database: Shutting down.
    Dec 29, 2017 20:46:42.679 [0x7f304fffe700] DEBUG - Stopping file watcher for com.plexapp.system
    

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility

     Reporting Plex Server issues | Plex Media Server FAQ | Linux Tips

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements

    Hosts: Fedora, QNAP, Synology, most Linux distros in VM

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • hossmanhossman Members, Plex Pass Posts: 5 Plex Pass

    Yes that was the time I restarted the service to collect logs. That was also when it stopped responding. just prior to that. I renamed that file to remove the apostrophe.
    The service was not responding agian this morning. I'm told they were unable to play a movie last night . Here was the status of the service before the restart

    root@XXXXX:/mnt/plex/Movies# systemctl status plexmediaserver.service
    ● plexmediaserver.service - Plex Media Server for Linux
    Loaded: loaded (/etc/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
    Active: active (running) since Fri 2017-12-29 20:49:11 EST; 1 day 13h ago
    Process: 16228 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -p "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}"
    Main PID: 16234 (sh)
    CGroup: /system.slice/plexmediaserver.service
    ├─ 8789 /usr/lib/plexmediaserver/Plex Relay -p 443 -N -R 0:localhost:32401 -o StrictHostKeyChecking=yes -o UserKnownHostsFile=/var/lib/plexmediaserver/Librar
    ├─13768 Plex Plug-in [com.plexapp.agents.none] /usr/lib/plexmediaserver/Resources/Plug-ins-fc63598ba/Framework.bundle/Contents/Resources/Versions/2/Python/bo
    ├─16234 /bin/sh -c /usr/lib/plexmediaserver/Plex\ Media\ Server
    ├─16235 /usr/lib/plexmediaserver/Plex Media Server
    ├─16378 Plex Plug-in [com.plexapp.system] /usr/lib/plexmediaserver/Resources/Plug-ins-fc63598ba/Framework.bundle/Contents/Resources/Versions/2/Python/bootstr
    ├─16424 /usr/lib/plexmediaserver/Plex DLNA Server
    ├─16427 /usr/lib/plexmediaserver/Plex Tuner Service /usr/lib/plexmediaserver/Resources/Tuner/Private /usr/lib/plexmediaserver/Resources/Tuner/Shared 1.11.0.4
    └─16663 Plex Plug-in [com.plexapp.agents.plexthememusic] /usr/lib/plexmediaserver/Resources/Plug-ins-fc63598ba/Framework.bundle/Contents/Resources/Versions/2

    Dec 30 19:51:57 XXXXX.XXXX.XXXX sh[16234]: Sqlite3: Sleeping for 200ms to retry busy DB.
    Dec 30 19:51:57 XXXXX.XXXX.XXXX sh[16234]: Sqlite3: Sleeping for 200ms to retry busy DB.
    Dec 30 19:51:57 XXXXX.XXXX.XXXX sh[16234]: Sqlite3: Sleeping for 200ms to retry busy DB.
    Dec 30 19:51:57 XXXXX.XXXX.XXXX sh[16234]: Sqlite3: Sleeping for 200ms to retry busy DB.
    Dec 30 19:51:57 XXXXX.XXXX.XXXX sh[16234]: Sqlite3: Sleeping for 200ms to retry busy DB.
    Dec 30 19:51:57 XXXXX.XXXX.XXXX sh[16234]: Sqlite3: Sleeping for 200ms to retry busy DB.
    Dec 30 19:51:57 XXXXX.XXXX.XXXX sh[16234]: Sqlite3: Sleeping for 200ms to retry busy DB.
    Dec 30 19:51:57 XXXXX.XXXX.XXXX sh[16234]: Sqlite3: Sleeping for 200ms to retry busy DB.
    Dec 30 19:51:57 XXXXX.XXXX.XXXX sh[16234]: Sqlite3: Sleeping for 200ms to retry busy DB.
    Dec 30 19:51:57 XXXXX.XXXX.XXXX sh[16234]: Sqlite3: Sleeping for 200ms to retry busy DB.

    Also, of note, I disabled the verbose logging after the last restart. Now after this restart the verbose logging was re-enabled. like the change didn't keep. I recollected logs after disabling verbose again.

    I also notice that the photo libraries will be the first to go unresponsive. They will display "There was an unexpected error loading this library" on the web page.

  • ChuckPAChuckPA Members, Plex Pass, Plex Ninja, Plex Team Member Posts: 22,850 Plex Team Member
    Accepted Answer

    Thank you for the updated logs.

    I found a major, possible the root, contributor to your problem.

    Dec 31, 2017 10:16:54.937 [0x7f2dce3f8700] DEBUG - [com.plexapp.system] HTTP reply status 200, with 61162 bytes of content.
    Dec 31, 2017 10:16:54.943 [0x7f2dca3ff700] WARN - SLOW QUERY: It took 330.000000 ms to retrieve 0 items.
    Dec 31, 2017 10:16:54.943 [0x7f2dca3ff700] DEBUG - DVR:Subscription: Episode 'Bird Brain' airs on channel 15 at 2017-12-30 16:00:00
    

    Due to the amount of media you've loaded (Photos count), the database has become fragmented.

    I therefore recommend manually optimizing the database (Hover over Libraries, expose the elllipsis, click it, click Optimize Database)
    I also suggest you verify the database is optimized during schedule maintenance. If your system is turned off during that time, I suggest you find a time when it will be on.

    Settings - Server - Scheduled Tasks.

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility

     Reporting Plex Server issues | Plex Media Server FAQ | Linux Tips

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements

    Hosts: Fedora, QNAP, Synology, most Linux distros in VM

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • hossmanhossman Members, Plex Pass Posts: 5 Plex Pass

    So that helped. The interface is still response but after a period of time when I go to access any media. like play a movie or view a photo the system displays loading then after awhile just goes back to the play screen and I have to restart the service to be able to play.
    I've upload log from before and after the service restart.

  • ChuckPAChuckPA Members, Plex Pass, Plex Ninja, Plex Team Member Posts: 22,850 Plex Team Member

    I've been investigating with other support team members and engineering.

    We'd like to request you make a query of PMS the next time it stops responding. / behaves this way.

    Specifically,

    1. Retrieve your X-Plex-Token (PlexOnlineToken) from Preferences.xml (don't include the quotes)
    2. Use it in a direct query to PMS http://127.0.0.1:32400/connections?X-Plex-Token=xxxxxx
    3. PM that output from the query to me, with the link to this thread and a few words to jog my memory.

    Thanks.

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility

     Reporting Plex Server issues | Plex Media Server FAQ | Linux Tips

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements

    Hosts: Fedora, QNAP, Synology, most Linux distros in VM

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • hossmanhossman Members, Plex Pass Posts: 5 Plex Pass

    Not sure what changed, but since my last restart last week (Before I saw the message about the direct query) it has been functioning normally.
    systemctl status plexmediaserver.service
    ● plexmediaserver.service - Plex Media Server for Linux
    Loaded: loaded (/etc/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
    Active: active (running) since Fri 2018-01-05 21:30:27 EST; 1 weeks 0 days ago

    Thanks for the help about Database Optimization.

Sign In or Register to comment.