Server Version#: 1.25.0.5246
Player Version#: All players
QNAP TS-653 Pro
QTS 5.0.0.1853
Hi,
I have been using PMS for years on my QNAP NAS without issue until now. I recently started using Sonarr, Radarr and SABNZBD to do some media automation. SAB is set to a schedule and will download overnight and this is when PMS will seemingly stop responding and/or crash at some point in this process.
A simple stop and start doesn’t seem to fix it and i will often now have to completely restart the NAS to get it to work again and then manually tell it to scan library files to grab what came in overnight. It has now gone even further in that when it does come back, i can’t seem to remotely access the server anymore and it will occasionally require a second restart of the NAS to get it to come back to life. Reinstalling over the top doesn’t seem to help at all aand i have tried running the following prior to reinstall with again no results.
cd /share/CACHEDEV2_DATA/.qpkg/PlexMediaServer
rm ‘Plex Media Server’
I am all but at a dead-end at this point. I’m by no means the most tech-literate but I’m no novice either. I would be very grateful for any assistance anybody could provide.
I am assuming there is something funky happening between the automation with SAB, Sonarr, Radarr, etc. as it started happening not long after this was established but not sure why. It is almost as if PMS isn’t sure how to handle the flow of content coming in overnight. Very strange.
I have log files i can provide as well on request. I have never looked at them before and have no baseline of how to interpret them however one thing i have noticed is in the Plex Media Server logs it has a whole lot of:
Nov 20, 2021 07:31:03.174 [0x7f96c17d06e8] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:31:04.382 [0x7f96c17d06e8] ERROR - Database corruption: sqlite3_statement_backend::loadOne: database is locked
Which i assume is likely the issue, i just don’t know what is causing it.
Next time it happens, please provide a zip with all the PMS logs, instead of a simple snip of the lines you found, since they can’t provide the full picture!
Got logs, just didn’t want to freely upload them to the world without fully understanding what is in them haha. Never had need for them before so lack the familiarity. Happy to pm them?
Sadly not a user of the automation tools you use, including etc
When said, and what I can see in the logs, is that you are hammering so much on your QNAP, so your PMS simply lost access to the file system!
From your logs:
Nov 20, 2021 07:56:43.795 [0x7f681500db38] WARN - Warning: ex: boost::filesystem::last_write_time: No such file or directory: "/share/CACHEDEV2_DATA/.qpkg/PlexMediaServer/Resources/Plug-ins-8dcc73a59", couldn't check file: "/share/CACHEDEV2_DATA/.qpkg/PlexMediaServer/Resources/Plug-ins-8dcc73a59"
When said, when your auto tools fetch media, did you make sure that the medias was downloaded to a directory out of PMS reach?
If not, then make it so, and configure your tools to move the medias afterwards to PMS and then notifying it about new medias present
And don’t ask for a HowTo, google that or consult their forums
Also, I see that the PMS database is very busy!
From the logs, and only one of many:
Nov 20, 2021 07:10:23.207 [0x7f68132b6b38] ERROR - Saving activity history aborted with soci exception: sqlite3_statement_backend::loadOne: database is locked
Nov 20, 2021 07:10:23.207 [0x7f68132b6b38] DEBUG - Activity: Ended activity 29e81283-e6fc-4e11-a876-a4eb6c231e84.
Nov 20, 2021 07:10:24.230 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:10:26.471 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:10:28.704 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:10:30.935 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:10:33.190 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:10:35.430 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:10:37.661 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:10:39.893 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:10:42.128 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:10:44.368 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:10:46.601 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:10:48.833 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:10:51.073 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:10:53.303 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:10:55.552 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:10:57.791 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:11:00.022 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:11:02.266 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:11:04.494 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:11:06.746 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:11:07.954 [0x7f68132b6b38] ERROR - Saving activity history aborted with soci exception: sqlite3_statement_backend::loadOne: database is locked
Nov 20, 2021 07:11:08.974 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:11:11.213 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:11:13.452 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:11:15.689 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:11:17.924 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:11:20.155 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:11:22.387 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:11:24.616 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:11:26.847 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:11:29.092 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:11:31.323 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:11:33.553 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:11:35.783 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:11:38.013 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:11:40.252 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:11:42.477 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:11:44.706 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:11:46.935 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:11:49.188 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:11:51.424 [0x7f68132b6b38] WARN - Waited one whole second for a busy database.
Nov 20, 2021 07:11:52.633 [0x7f68132b6b38] ERROR - Saving activity history aborted with soci exception: sqlite3_statement_backend::loadOne: database is locked
And also see that you are on QTS 5.0.0.1853
Do you have AntiVira solution enabled?
If so, disable that, since it can lock up the database
Also, when did you optimize the PMS database?
And lastly, when your PMS is starting up after a reboot, I see that even though the logs says it tries to shutdown correctly, it fails, since it needs to recover items from the wal database
Nov 20, 2021 06:59:08.257 [0x7f681b4a06e8] INFO - SQLITE3:0x80000001, 283, recovered 1175 frames from WAL file /share/CACHEDEV2_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db-wal
So all in all, consult your auto-tool logs to find out which one is breaking your QNAP, since it’s not PMS, and also maybe run your tools on another platform, since there’s a limit to how much you can run on a Celeron based QNAP