Server Version#:4.3.6.0993
Player Version#: 1.16.2.1321
So I enabled “Plex” Notification and everything went smooth after fresh installation for the server (PMS) and things were extremely ok, and all of a sudden I start getting “Database Corrupted Error” through notification, my media seems to be in a good shape though I notice when adding new file I have to refresh it manually to be discovered by PMS.
I need to understand why this error appears ? how to solve it and prevent it from happening again ?
I went through the article for fixing database in case of corruption but I didn’t get how to install it on QNAP.
Waiting feedback on this issue
and thanks always for your help
Plex Media Server Logs_2019-07-20_07-53-41.zip (2.9 MB)
I ran into the same issue. Same Firmware (4.36.0993) and Plex Server (1.16.2.1321 on QNAP TVS863+. I was repairing the database every day. I checked the drive integrity on my QNAP, ran RAID scrubbing and everything checked out as fine, but this database issue still kept happening. This went on for a week and then Plex Server completely stopped working, would not show up anymore. Tried restart after restart of both QNAP and Plex, tried to install older versions of Plex server and nothing. Again, I checked my server to ensure the drives were not failing and all checked out as good. I had to uninstall Plex completely (thousands of shows and movies). This is where it became a huge pain. Plex went through uninstall and then just permanently stuck at removing in the Qnap App center. It sat there for 3 days. I ssh into QNAP and see that the Plex is still found in the .qpkg folder. Start the manual removal process of deleting the directories. Plex server makes hundreds of thousands of directories and files so the rm -rf process takes 12+ hours. Okay, now that is done, Plex is still stuck at removing in App Center. That sucks, have to manually edit the qpkg.conf file to remove it from there. I have been using Plex on QNAPs for 7+ years and this was a totally failure of the Plex server. Will probably only install and try a few shows/movies to start and see if it works again.
To add on how I repaired the database:
- I connected to QNAP via filezilla in sftp/ssh mode. Go to the directory which has plex installed. From here, you can get to the folder containing the library.db file (Plug-in Support/Databases)
- Copy over the com.plexapp.plugins.library.db to your computer (i used mac)
- Run commands as listed here
https://support.plex.tv/articles/201100678-repair-a-corrupt-database/
- Copy back to folder using filezilla. Make sure you remove db.shm, db-wal
.
1 Like
Interesting. I’m running 4.4.1 on two systems with 1.16.2.1231 and not experiencing this.
Can you both tell me about your hardware configurations, inclusive of UPS attached and when last system diagnostics were run as well as dust bunnies blown out?
1 Like
TVS-863+, 8GB RAM
8 - 5GB HGST NAS drives
Configured in RAID 5
UPS APC BN1500M2
Fans and system cleaned regularly, no heat issues or air flow issues.
SMART tests fine (less than 5 days ago)
RAID Scrubbing fine (less than 5 days ago)
Diagnostics
All fine except.
Kernel Log
Plex Media Scan[15339]: segfault at fffffffe03a67bfc ip007f11b92f9bf7 sp007ffea1bbe658 error 5 in libh264_decoder.so[7f11b91b0+1b0] – Count:0
Plex Media Scan[11392]: segfault at fffffffffffffffd ip007f97ce0e3f50 sp007ffd51f12b48 error 5 in libstdc++.so.6[7f97ce020+120] – Count:0
Plex Media Scan[11602]: segfault at fffffffffffffffd ip007f397f54d3ef sp007ffc023186e0 error 7 in libsoci_core.so[7f397f510+40] – Count:0
Plex Media Scan[18377]: segfault at fffffffffffffff8 ip007fa7b335ff50 sp007ffef926efc8 error 5 in libstdc++.so.6[7fa7b32a0+120] – Count:0
Thanks for the Info.
Do you have the previous version QPKG to install on top of?
I have 1.14.1.5488 and 1.15.1.791 to use. These were both working fine before this. I plan on getting everything up and running tomorrow and try with just a few shows and see if the issue is corrected.
Thanks for the feedback,
However I didn’t get the part related to fix of the database as I didn’t know how to install “SQLlite3” on QNAP unless I am missing something here ! appreciate if you could assist on how to install it 
And I already uninstalled Plex and install again as I mention earlier and same error keep appear again and again ! it’s so frustrating !!!
Here are the specs for QNAP - TVS471;
You can copy the database to a computer that has SQLite3 on it already. I did this on my mac. I repaired on my Mac as instructed and then transferred back to the QNAP using filezilla in ssh/sftp mode. Before you transfer back make sure you delete the old database file and the ones with the .db-shm and .db-wal extensions. Alternatively, you could install the Container Station and then install a lightweight linux distro to repair it.
1 Like
Okay, so going with a fresh install of the last working version of Plex for me (1.15.1.791) after completely deleting all traces, running disk tests and kernel diagnostics beforehand, with all checking out fine, Plex still not running properly. While building the database for a subset of shows (about 1500-2000 episodes), not all metadata was loaded, I started to manually refresh metadata for unloaded shows and during this time a database error occurred (unexpected error loading dashboard has always been the indicator before and was again here). I went tried to get to the console to see what was going on and that is when everything locked up. QNAP crashed and rebooted. I checked the drives, kernel, etc. and again no problems.
Plex had several errors in the log file like this:
Jul 22, 2019 18:38:04.652 [0x7f0284d99740] ERROR - Transcoder: Error cleaning old transcode sessions: boost::filesystem::directory_iterator::construct: No such file or directory: “/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/Cache/Transcode/Sessions”
Jul 22, 2019 18:38:04.753 [0x7f0274782700] ERROR - SQLITE3:(nil), 14, cannot open file at line 38389 of [bf8c1b2b7a]
Jul 22, 2019 18:38:04.753 [0x7f0274782700] ERROR - SQLITE3:(nil), 14, os_unix.c:38389: (2) open(/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/Cache/gn_lists.gdb) - No such file or directory
Jul 22, 2019 18:38:04.788 [0x7f0274782700] ERROR - Gracenote: Playlist locale error -1870658559 (An error occurred in the query subsystem.)
Jul 22, 2019 18:38:04.788 [0x7f0274782700] ERROR - SQLITE3:(nil), 14, cannot open file at line 38389 of [bf8c1b2b7a]
Jul 22, 2019 18:38:04.788 [0x7f0274782700] ERROR - SQLITE3:(nil), 14, os_unix.c:38389: (2) open(/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/Cache/gn_lists.gdb) - No such file or directory
I never have had music on my server and was not transcoding anything at the time.
I was able to delete Plex again. This time no hang and it fully deleted all directories.
I suspect something is up with the new firmware from QNAP. I am hesitant to try again and may go for a full factory reset of the QNAP, but need to back up 15TB first. Won’t be able to get anywhere for some time. Any insight is appreciated.
Ignore the gn_lists . Gracenote is no longer used. Engineering hasn’t removed that code yet.
May I have the full DEBUG logs (INFO/ERROR only is insufficient)
DEBUG on, VERBOSE off
Plex Media Server Logs_2019-07-22_18-38-29.zip (3.9 MB)
Here are the last logs I generated. I have removed Plex due to crashing my system. Not going to risk the integrity of data.
Do you have 1.14.1.5488 ?
1.14.1.5488 is the final build before the new build system.
If it crashes with that, there is indeed something wrong with your QTS installation.
It might be in your best interest to contact QNAP, save the configuration and Re-install the firmware with their assistance.
These logs show normal activity. absolutely nothing out of place. the gracenotes DB is separate so primary DB isn’t touched.
I do have 1.14.1.5488.
I will give it a shot.
I will likely give the firmware install another shot, too, if needed.
Thanks.
ok… I recommend 1.14.1.5488 as the simplest step
It rules out the entire build system changes.
If this is stable, the implication of your QTS installation needing reinstall. (corrupted runtime libraries)
Tried running the script after getting the database backuped outside QNAP and run the script listed in your previous post, and the surprise it returns no error ! Though I keep getting the same error message through Plex Notification.
Does that sounds right 
Plex Media Server Logs_2019-07-25_10-16-29.zip (2.6 MB)
Any idea about my issue, since I open the topic and all I got is nothing from your side
Are you using factory memory or did your swap out/upgrade with 3rd party memory?
I upgraded the RAM from the shop I bought the device from, and been working perfectly ever since, why ?
I tried 1.14.1.5488 and it installed without issue. However, access to the server through the web interface was very spotty and eventually became inaccessible through all devices. I believe that while both of us in the thread have database issues as our foundation or our issues, the causes may be very different. I am backing everything up and will try to upgrade to beta 4.4.1 to see if that fixes the issue. The only qpkg that is causing any problems is Plex. I will update when I attempt the next fix.