I am unable to keep PMS running for anything more than a few minutes after upgrading to 1.23.6.4810. I tried reverting to the latest stable version and that has NOT remedied the issue. Would appreciate any assistance I can get.
Took a quick peek at your logs and this error I can see a lot of …
Jul 22, 2021 07:17:33.086 [2848] ERROR - Failed to begin transaction (..\Plugins\PluginDatabaseState.cpp:110) (tries=1): Cannot begin transaction. database is locked
Could the plugin be causing your problems? Have you tried stopping plex, removing it and starting again to see if things are more stable ?
Also… some other errors of note are these ones:
Jul 22, 2021 07:18:06.852 [9108] ERROR - [Grabber] Failed to begin transaction (..\MediaProviders\Grabbers\MediaGrabber.cpp:134) (tries=1): Cannot begin transaction. database is locked
Jul 22, 2021 07:18:03.711 [2848] ERROR - Caught exception starting plugin C:\Users\Randa\AppData\Local\Plex Media Server\Plug-ins\WebTools.bundle (Cannot begin transaction. database is locked)
Certaintly looks like your DB is locked somehow so I’d suggest removing the plugins and see if plex can run for a while without them.
I was just poking around and noticed the database locks myself. I’ll see what I can do about ditching plugins and check back. I don’t use them anymore.
Okay – good luck – if its still failing after ditching them upload a clean set of logs and I’ll try and take another look later (unless someone else jumps in before me).
I just began having this issue as well, though a rollback to an earlier version of plex did not resolve the issue, nor did a db rollback. Can confirm removal of plugins does not resolve the issue.
I’m having the same problem since the last update that went through this morning. I also had no luck rolling back to the previous Media Server version or uninstalling and reinstalling the newest version. I was about to try and restore a copy of my database from two days ago, but I’m not sure if it’s going to really fix the problem based on what I see here and I would rather not do that if I can avoid it.
I rarely if ever come to or post to the forums for help and am not used to producing logs, so I’m not sure how much help I’ll be, but I’ll see if I can provide any more info to get help this resolved.
In the meantime, this is what I’m seeing: Viewing my server from the PLEX Windows app, everything is visible like normal on the Home screen, but clicking on any piece of media or list just spins wheel and eventually fails. The console spits out an endless stream of “Waited one whole second for a busy database” with occasional “Failed to begin transaction… database is locked” messages interspersed.
I have no plugins and am a pretty basic user, but I’m pretty good figuring things out when given clear instructions, so let me know if I can help with anything.
Only guessing here but the big update in this build was…
NOTE: This release changes how DVR identifies channels internally.
I don’t use DVR myself but if you do then maybe whatever internal stuff is happening by plex in the backend is taking a long time on certain platforms. Has anyone tried just leaving the the server running after upgrade for an hour (or couple of hours) to give plex time to do it’s stuff?
Guessing this is due to to the locking errors I seen in the the logs. DB could be just doing stuff and plex maybe unavailable until its finished.
Maybe @Ridley could comment considering a few have run out into this.
My PC auto-restarts overnight on the routine, so she gets a good couple of two, three hours before being asked to do anything. I discovered the crash after this morning’s restart. I’ll let her sit now, and see what we get.
I’ll just add that I don’t use DVR and have allowed the server to sit for a while with no resolution.
I also tried updating the library earlier and while it seemed to have no trouble locating everything while scanning, every item remained locked/unreachable.
Thanks for your help in trying to figure this out. It does indeed seem like we’ll need someone from the PLEX team to jump in. I’m glad it doesn’t appear to be an entirely isolated issue, but it unfortunately doesn’t seem widespread enough that I expect an immediate fix.
I solved the crashing issue by deleting the DVR before it could crash and letting it detect it again, but the 5-10 minute db lock issue still persists and appears unrelated. I actually moved the db to ram (64/112Gbps read/write) just to see if I was being throttled by my SSD somehow and I think the db lock actually increased in time -_-
I have no idea what happened, because I changed literally nothing, but everything suddenly seems to be working again. I’ll check in again if I either identify what might have resolved the issue or if the problem returns.
Having this issue myself too, except I’m running the docker version on Ubuntu 21.04. Same exact error as y’all,
Failed to begin transaction (…/Plugins/PluginDatabaseState.cpp:110) (tries=1): Cannot begin transaction. database is locked
Posted a thread earlier under the server-docker tag here with logs, steps taken, etc.
For those saying downgrading didn’t work, I’m not sure which version you downgraded to… If it was above v1.23.3.4707, then try v1.23.3.4707. This is the last version (available on docker version tags at least) that works for me. Nothing should go wrong, but make a backup of your DB just in case before downgrading. No DB or other modifications were necessary, worked normally again after rolling back to and starting that version.
After rolling back to 1.23.3.4707-ebb5fe9f3 on linux all is good. But before that 100% cpu and huge stalls in the database.
A huge stream of Sqlite3: Sleeping for 200ms to retry busy DB.
This does not appear to be a corruption issue on our end, it appears to be something totally borked on the newer versions of the server.
Really appreciate the advice Derple, I rolled back to a slightly lower version but didn’t think I’d have to go back this far.
EDIT:
So in the case that a Plex team member actually reads this,
I was running 1.23.5.4841-549599676
Errors started to happen to I ran through the database repair after doing some backups, even attempted to restore some of the older backups of the database and nothing would work.
As soon as I reverted to the older version everything started working again regardless of which database I put back in. Back to the original backup I made today.