Server Version#: 1.15.5.994
Player Version#: n/a
Logs: Plex Media Server Logs_2019-05-01_10-54-02.zip (4.1 MB)
Nothing much has changed with my server environment other than PMS version upgrades and the routine library additions. I have already manually verified my database is optimized and free from corruption by dumping and reimporting it.
Over the past 3-4 weeks, my PMS has routinely, after 36 to 48 hours of running, crashed. Ubuntu systemd always logs the following immediately before the crash:
Apr 29 21:25:13 nix14 sh[22200]: Sqlite3: Sleeping for 200ms to retry busy DB.
Apr 29 21:25:13 nix14 sh[22200]: Sqlite3: Sleeping for 200ms to retry busy DB.
Apr 29 21:25:13 nix14 sh[22200]: Sqlite3: Sleeping for 200ms to retry busy DB.
Apr 29 21:25:13 nix14 sh[22200]: Sqlite3: Sleeping for 200ms to retry busy DB.
Apr 29 21:25:13 nix14 sh[22200]: Sqlite3: Sleeping for 200ms to retry busy DB.
Apr 29 21:25:13 nix14 sh[22200]: Sqlite3: Sleeping for 200ms to retry busy DB.
Apr 29 21:25:13 nix14 sh[22200]: Sqlite3: Sleeping for 200ms to retry busy DB.
Apr 29 21:25:13 nix14 sh[22200]: Sqlite3: Sleeping for 200ms to retry busy DB.
Apr 29 21:25:13 nix14 sh[22200]: Sqlite3: Sleeping for 200ms to retry busy DB.
Apr 29 21:25:13 nix14 sh[22200]: Sqlite3: Sleeping for 200ms to retry busy DB.
Apr 29 21:49:20 nix14 sh[22200]: *** Error in `/usr/lib/plexmediaserver/Plex Media Server': double free or corruption (!prev): 0x00007fa5a05fe8d0 ***
Apr 29 21:49:20 nix14 sh[22200]: ======= Backtrace: =========
...
Apr 29 21:49:21 nix14 sh[22200]: ****** PLEX MEDIA SERVER CRASHED, CRASH REPORT WRITTEN: /var/lib/plexmediaserver/Librar
Apr 29 21:51:50 nix14 systemd[1]: plexmediaserver.service: Main process exited, code=exited, status=134/n/a
Today’s was
*** Error in '/usr/lib/plexmediaserver/Plex Media Server': munmap_chunk(): invalid pointer: 0x0000000000958dd8 ***
But the systemd log is full of Sqlite3: Sleeping for 200ms to retry busy DB entries throughout usage.
My library database is stored on a SSD RAID1 capable of over 500MB/s non-cached reads and over 300MB/s writes. The same volume is used for transcoding which handles 8 concurrent users without an issue so I’m baffled as to why the SQL database is running into so many locks. Additionally, these crashes can occur when there is no or little activity on the server. I cannot find in the PMS logs the warning that might correspond to these Sqlite3 errors in systemd. I’ve seen a few others recently share the same experience on these forums with little or no feedback from Plex yet:
https://forums.plex.tv/search?q=Sleeping%20for%20200ms
Historically, I only needed to restart my PMS host about monthly for routine patch management and the PMS service only during manual version upgrades, but over the past month I’ve had to intervene manually to restart the service 3-4 times per week.