You know what, I am really tired of this problem with database corruption… This seems to be a regular occurrence and the solution of manually deleting the .db files is a terrible one.
The dashboard should never disappear!!! Am I taking crazy pills? why hasn’t this been fixed with an update?
I pay $5 a month for an app that hardly functions as it should. Plex, you can do better than this.
First, I want to know what causes database corruption. Second, why isn’t there a better solution for this? Like something in the settings to do this automatically if the database becomes corrupt for some reason. Why do we have to trawl through the config files, this is way more complicated than it should be and its seems like a massive oversight.
I feel really bad for people just getting into Plex (because it obviously has some amazing capabilities hence why people are using and paying for it) but every problem seems to be dealt with by entering the forums and posting logs and never getting answers, instead you just get asked for more logs and end up with no actual resolution to the problem.
I have faced so many issues with Plex. Dashboard not showing up, files being merged that have no similarities in the naming structure, Plex not loading at all or Plex being completely unusable when other things are happening on the host computer like encoding or downloading.
@T.O.M. said:
You know what, I am really tired of this problem with database corruption… This seems to be a regular occurrence and the solution of manually deleting the .db files is a terrible one.
The dashboard should never disappear!!! Am I taking crazy pills? why hasn’t this been fixed with an update?
I pay $5 a month for an app that hardly functions as it should. Plex, you can do better than this.
First, I want to know what causes database corruption. Second, why isn’t there a better solution for this? Like something in the settings to do this automatically if the database becomes corrupt for some reason. Why do we have to trawl through the config files, this is way more complicated than it should be and its seems like a massive oversight.
I feel really bad for people just getting into Plex (because it obviously has some amazing capabilities hence why people are using and paying for it) but every problem seems to be dealt with by entering the forums and posting logs and never getting answers, instead you just get asked for more logs and end up with no actual resolution to the problem.
I have faced so many issues with Plex. Dashboard not showing up, files being merged that have no similarities in the naming structure, Plex not loading at all or Plex being completely unusable when other things are happening on the host computer like encoding or downloading.
I appreciate you trying to help but let me just say this:
This has happened multiple times to me for no reason;
I actually restored from a previous backup about a month ago because when some things got moved Plex decided it didn’t like that, and here we are same problem again (and every time I have to do this I lose sometimes weeks or months worth of play counts and watch history;
The optimise database feature never works properly (it doesn’t give you any feedback if it is doing something and 98 percent of the time it just says “failed to optimise database”.
I’m not accepting this as a answered problem, the problem still persists therefore it iS NOT fixed.
There needs to be a better way of doing this, there should at a minimum be a repair database switch or something, surely.
Its like I have to study code and become a programmer in order for Plex to be functional.
Not good enough, this should be a priority for Plex.
@T.O.M. said:
I appreciate you trying to help but let me just say this:
This has happened multiple times to me for no reason;
I actually restored from a previous backup about a month ago because when some things got moved Plex decided it didn’t like that, and here we are same problem again (and every time I have to do this I lose sometimes weeks or months worth of play counts and watch history;
The optimise database feature never works properly (it doesn’t give you any feedback if it is doing something and 98 percent of the time it just says “failed to optimise database”.
I’m not accepting this as a answered problem, the problem still persists therefore it iS NOT fixed.
There needs to be a better way of doing this, there should at a minimum be a repair database switch or something, surely.
Its like I have to study code and become a programmer in order for Plex to be functional.
Not good enough, this should be a priority for Plex.
I am afraid without diagnostics there is nothing to go on.
For me where I have had this failure occur, it was never to do with database corruptions. In all cases it was to do with the database access being slow and needing to be optimized. Steps have already been taken to optimize the database more frequently
If it is happening a lot to you and database is getting corrupted repeatedly then the circumstances need to be understood - but without diagnostics to see what is happening then it is not possible to do any investigation.
Is the database on a local drive ? Sqlite3 databases can easily get corrupted if they are held on a network share.
What is needed here is to first understand why the dashboard is failing to load and the server logs would help there.
Hi @sa2000
I got pretty much the same issue. Plex server didn’t start any more due to currupt database. I tried to fix it via sql3lite. After the fix I was able to start the Plex server again. However, the dashboard and the movie library didn’t show up properly. Other libraries like series worked just fine.
More details on that (when accessing the server via the web view):
The dashboard said “There was an unexpected error loading the dashboard”
When clicking the movie library it showed me the number of movies in it but it seemed to be an empty grey page. However, I realized that I can scroll down and movies started to appear
When going to the series library, I instantly see all the series available.
When accessing the plex via the Android app it looked like this:
The startpage said something like “Open the navigation manue and select your library to show content”
The movie library said “No entries”
The series library showed all series properly
I tried to optimze the library via “Optimize database” within the plex server (around 23:19:27) but it failed. I logged everything - you can find it attached. Can you give me some hints how to solve this? Unfortunately, I haven’t done any backup lately.
@krapfa said:
Hi @sa2000
I got pretty much the same issue. Plex server didn’t start any more due to currupt database. I tried to fix it via sql3lite. After the fix I was able to start the Plex server again. However, the dashboard and the movie library didn’t show up properly. Other libraries like series worked just fine.
More details on that (when accessing the server via the web view):
The dashboard said “There was an unexpected error loading the dashboard”
When clicking the movie library it showed me the number of movies in it but it seemed to be an empty grey page. However, I realized that I can scroll down and movies started to appear
When going to the series library, I instantly see all the series available.
When accessing the plex via the Android app it looked like this:
The startpage said something like “Open the navigation manue and select your library to show content”
The movie library said “No entries”
The series library showed all series properly
I tried to optimze the library via “Optimize database” within the plex server (around 23:19:27) but it failed. I logged everything - you can find it attached. Can you give me some hints how to solve this? Unfortunately, I haven’t done any backup lately.
The database has issues still
Can you first tell me if Z:\ is a local HDD or network share / mapped drive?
I see you have the Plex App Data, which would include the database, on the Z:\ Drive
If it is a network share then that could be a factor in getting corruptions. The SQLite3 database needs to be on a local drive
The log shows a number of database errors like this
Jan 25, 2017 23:16:02.343 [6760] ERROR - Soci Exception handled: Cannot convert data to std::tm.
These are data value errors where the field - probably some date related field has some invalid value in one or more places
These errors were encountered when generating the views of your libraries
The database optimization failed with some more serious error
Jan 25, 2017 23:19:27.552 [12168] ERROR - SQLITE3:A254CF6C, 1, statement aborts at 4: [insert into fts4_metadata_titles(fts4_metadata_titles) VALUES('optimize')] SQL logic error or missing database
Jan 25, 2017 23:19:27.552 [12168] ERROR - Exception inside transaction (inside=1) (..\Library\FullTextSearch.cpp:16): sqlite3_statement_backend::loadOne: SQL logic error or missing database
Jan 25, 2017 23:19:27.554 [12168] ERROR - Soci Exception handled: sqlite3_statement_backend::loadOne: SQL logic error or missing database
If you do not have a backup to restore from, and since you have already gone through Repair a Corrupt Database, then only option would be to start afresh
So suggested actions:
If Z:\ is a network drive, then abandon this idea and have the Z:\Plex\AppData\Local\Plex Media Server\ area on a local drive instead
Check the drive for any bad sectors / issues by running chkdsk against it repairing any bad sectors (Properties / Tools / Check for Errors / Scan)
In all the years I’ve had Plex on various hardware the DBs consistently get corrupted over time, especially large ones. This has been going on for years and is the main problem with Plex. Despite many users reporting this, it just keeps getting minimized and generally ignored. There is a serious design flaw somewhere.
@ziloni said:
In all the years I’ve had Plex on various hardware the DBs consistently get corrupted over time, especially large ones. This has been going on for years and is the main problem with Plex. Despite many users reporting this, it just keeps getting minimized and generally ignored. There is a serious design flaw somewhere.
There could be a number of reasons for this to arise.
At this moment of time, most reported issues are to do with the use of RDP and a suspected windows security change enforcing Per Session Temp Directory and the problem is avoided by not using RDP or by changing the Temp Directory Policy
Other causes could be database fragmentation or corruption. There have been cases when users placed the app data on a network share - this would lead to database corruptions. Hardware disk issues could also lead to database corruptions. Database fragmentation can be overcome by optimization - and the scheduled tasks do optimize periodically
Thanks for the reply, but its not helpful in my situation.
Its not RDP because its only affecting some files, and not others.
There are ton of users who report that downgrading Plex fixes this. So its obvious at some point a clear change was introduced which is causing problems.
Plex is several years old, and as of today still can’t properly run as a service without hacks and requires log in.
Its not on a network share, except the hacked instance I ran to make it possible to watch these files.
Database corruption is rampant and I’m not the only person to report this and its been around for quite a while.
I’m a software dev myself and its painfully obvious that:
a) Plex often ignores issues rather than fixing them or designing things properly.
b) Plex long ago should have been able to run as service.
c) Plex’s DB regularly corrupts itself and Plex doesn’t seem to care. I doubt its SQLLite itself, and its very likely a problem in Plex’s own code.
d) The transcoder issue should be very easy to trace back in their source control to locate the change which introduced this, but Plex does not seem interested.
There are ton of users who report that downgrading Plex fixes this. So its obvious at some point a clear change was introduced which is causing problems.
Point me to the database corruptions / dashboard not loading tons of users threads who fixed this by downgrading
Plex is several years old, and as of today still can’t properly run as a service without hacks and requires log in.
That is not relevant to this forum topic. In any case, there is currently a solution and it is not really a hack that was provided by @cjmurph and many users have adopted and you will find the topic for it at the top of the Windows Plex Media Server forum - but it is not relevant to the dashboard loading error.
Database corruption is rampant and I’m not the only person to report this and its been around for quite a while.
Plex’s DB regularly corrupts itself and Plex doesn’t seem to care. I doubt its SQLLite itself, and its very likely a problem in Plex’s own code.
It does happen but it is not rampant. I am yet to have a database corruption and I have been using Plex for 4 years.
The transcoder issue should be very easy to trace back in their source control to locate the change which introduced this, but Plex does not seem interested.
Again this is not relevant to the dashboard issue.
I have already posted in several Transcoder / Scanner crashes threads that a problem with ffmpeg leading to memory corruptions has been identified and will be fixed in the next release after 1.7.6
Thanks for the reply, but its not helpful in my situation.
Its not RDP because its only affecting some files, and not others.
Its not on a network share, except the hacked instance I ran to make it possible to watch these files.
Which files?
Do you have any logs to provide showing the issue that you are getting? And please reproduce the problem after ensuring Debug Logging enabled and server restarted and then get the logs when you have the problem
Sorry, I mixed threads with the downgrade. That should have been in reference to the transcoder problems:
Re files - thats in the other thread linked just above too with relevant parts of my log.
Sorry for mixing up the threads.
Re DB Corruption - there are tons of threads on this including many posts in the thread linked above too. It seems to happen more frequently with large libraries. I have an 8TB drive and this corruption issue is frequent for me and has been frequent even tough the hardware has been completely replaced during upgrades at least 2x over the years and I’ve seen it on other smaller plex installs too on my dev machine too.
99% of the time removing the library and readding it with no other changes fixes it, but it is extremely annoying. And I’ve seen many others post the same exact issue and same exact fix so its not isolated.
Re files - thats in the other thread linked just above too with relevant parts of my log.
Sorry for mixing up the threads.
This is out of context and not relevant to this thread. So I won’t say any more
@ziloni said:
Re DB Corruption - there are tons of threads on this including many posts in the thread linked above too. It seems to happen more frequently with large libraries. I have an 8TB drive and this corruption issue is frequent for me and has been frequent even tough the hardware has been completely replaced during upgrades at least 2x over the years and I’ve seen it on other smaller plex installs too on my dev machine too.
99% of the time removing the library and readding it with no other changes fixes it, but it is extremely annoying. And I’ve seen many others post the same exact issue and same exact fix so its not isolated.
I can;'t find any posts from you with logs showing the type of corruptions you got for your large libraries
If you believe there is an issue with large libraries and you are not forcing system shutdown whilst the database is being written to then please provide some evidence / i suggest you raise your own forum topic rather than continuing with other topics.
I’ve sent them in the past as DMs as requested. The log I mentioned above was regarding the transcoding issue, which doesnt appear to be related to the db corruption.
Next time it happens I can post a log. I had given up on the forums several times as for a long time the notifications were not working for some reason. I have a gmail address and they were not in spam or other, but until I reposted recently I never got any forum follow ups so I never knew of replies of previous threads.
However it doesn’t take long to find many users with the same db corruption issue including several users in the transcoding thread.
Is this a joke ? worked for you for what ? This cannot be a true statement for many reasons.
Publicizing a video made with 2013 information that is obsolete and not applicable to current versions of Plex Media Server or to the topic of this forum thread ???
The database file is /Users/sarahdisher/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db
Im not entirely sure if the issue is Database corruption for all of us facing this issue. I recently had to rebuild my Mac Mini and my PMS over from scratch, and received the same error before after the rebuild. The only common thing I have noticed is I am using the latest version of PMS. I can upload logs if needed.
The database file is /Users/sarahdisher/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db
Im not entirely sure if the issue is Database corruption for all of us facing this issue. I recently had to rebuild my Mac Mini and my PMS over from scratch, and received the same error before after the rebuild. The only common thing I have noticed is I am using the latest version of PMS. I can upload logs if needed.
Nobody said that all causes of this are a corrupt database. Database corruption is one cause. Of course logs are needed to investigate the cause of the error for you
The common causes are
Database Corruption
Database fragmentation needing a Library Optimize to be run
I ran into this problem recently after moving Plex from one server to another. I found that it was happening on accounts that had content restrictions. I fixed it by removing and re-adding the content restrictions. Hope this helps.
I ran into this problem recently after moving Plex from one server to another. I found that it was happening on accounts that had content restrictions. I fixed it by removing and re-adding the content restrictions. Hope this helps.
That was fixed today in a hot fix beta release 1.11.1.4768
I ran into this problem recently after moving Plex from one server to another. I found that it was happening on accounts that had content restrictions. I fixed it by removing and re-adding the content restrictions. Hope this helps.
That was fixed today in a hot fix beta release 1.11.1.4768
Ah, perfect. Thank you. I found that I was still having issues with restricted content displaying on the dashboard of the restricted users (however when clicking on said content an error would be displayed). I will update Plex and provide feedback here.