are there any indications how log the database migration should take?
Im having the :32400/web/index.html#!/ shows the following message for the last 24 hours:
<Response code="503" title="Maintenance" status="Plex Media Server is currently running database migrations."/>
the only activity I see in the Plex Media Server.log is:
DEBUG - Request: [127.0.0.1:47490 (Loopback)] GET /identity (2 live) #7f
DEBUG - Completed: [127.0.0.1:47490] 503 GET /identity (2 live) #7f 0ms 369 bytes (pipelined: 1)
the hex-number was up to 5 digits after 24 hours, saidly it seemed to have started fresh after restarting the server.
Plex Media Server.log (103.9 KB)
The log you provided indicates it’s busy with a migration, how big is your database?
the sizes are:
1.1G com.plexapp.plugins.library.db
4.4G com.plexapp.plugins.library.blobs.db
or is it just slow? since my post it went from #7f to #16b1
Request: [127.0.0.1:57416 (Loopback)] GET /identity (2 live) #16b1
Completed: [127.0.0.1:57416] 503 GET /identity (2 live) #16b1 0ms 369 bytes (pipelined: 1
)
That’s a pretty big database.
How much memory is available to PMS? It could be running out of memory during the migration and moving to swap which would absolutely cause it to bog down.
ah, yes memory seems to be at the limit.
Thanks for checking, I’ll see if we can do anything about reducing the memory usage during this migration.
For now, you may be better off just staying on 1.32.8. I couldn’t tell you how long it would take to complete this migration in this memory constrained state so unless you want to wait I’d say just go back to the public release for now.
If possible it would be really useful to get a copy of your database (only the main one, not the blobs db) so we can see what exactly is causing the issue.
There should be a recent backup of the database in the same folder as the main database, if you can grab that and put it up on Google Drive or similar and DM me a link it would definitely help a lot.
Ok, so the migration actually uses very little memory but your database had very subtle corruption where a few bits were flipped on one of the values which caused the conversion to get stuck in an infinite loop which triggered the runaway memory usage.
As you had another row which had identical values (and none of the corruption) I was easily able to fix this with one SQL query.
Just run this on your database before trying to update again (see https://support.plex.tv/articles/repair-a-corrupted-database/ on where to find the Plex SQLite tool (ignore the other steps), then open it with 'Plex SQLite' com.plexapp.plugins.library.db - then run the command below:
UPDATE media_streams SET extra_data = (SELECT extra_data FROM media_streams WHERE id = 2139775) WHERE id = 1982435;
.quit
Then start up PMS again, it still took a few minutes to complete on my side, but it did finish and should use hardly any memory.
Worked like a charm.
The migration was finished in under 5 minutes.
Many Thanks!
Awesome, thanks for confirming!
is this the same migration that was intruduced a few months ago where users could (but did not have to) switch to a new method of media recognition? I still have that “1” on “upgrade media library”.
No, that was a separate thing.
Converting your libraries is still recommended, though.
I am afraid having to invest hours of re-assigning items again after that conversion. what are the benefits of that conversion? are assets loading faster?
I am afraid of having to re-assign movies/tv shows again after conversion to the new scanning system. can I somehow convert and NOT have the new scanner scan my old files all again? they are all clean, so I want the scanner to only handle new additions. I guess that is not possible, right?