Jellyfin Forum
Migration error after disk full - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: Migration error after disk full (/t-migration-error-after-disk-full)



Migration error after disk full - allDaMedia - 2024-07-02

I'm using Jellyfin 10.9.2.0, and just experienced the transcoder  filling the harddrive to the brim with cache files.

I cleared the cache, and now the service errors out with a mall formed XML message.
It turned out to be the migration.xml file which was completely empty.
So I removed it, and allowed Jellyfin to recreate it.
But not Jellyfin is complaining about the migration failing:

Code:
[2024-07-02 11:56:13.774 -05:00] [WRN] Migrating the activity database may take a while, do not stop Jellyfin.
[2024-07-02 11:56:13.816 -05:00] [ERR] Could not apply migration '"MigrateActivityLogDatabase"'
Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 1: 'no such table: ActivityLog'.
  at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
  at Microsoft.Data.Sqlite.SqliteCommand.PrepareAndEnumerateStatements()+MoveNext()
  at Microsoft.Data.Sqlite.SqliteCommand.GetStatements()+MoveNext()
  at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
  at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
  at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader()
  at Emby.Server.Implementations.Data.SqliteExtensions.Query(SqliteConnection sqliteConnection, String commandText)+MoveNext()
  at Jellyfin.Server.Migrations.Routines.MigrateActivityLogDb.Perform()
  at Jellyfin.Server.Migrations.MigrationRunner.PerformMigrations(IMigrationRoutine[] migrations, MigrationOptions migrationOptions, Action`1 saveConfiguration, ILogger logger)
[2024-07-02 11:56:13.828 -05:00] [FTL] Error while starting server
Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 1: 'no such table: ActivityLog'.
  at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
  at Microsoft.Data.Sqlite.SqliteCommand.PrepareAndEnumerateStatements()+MoveNext()
  at Microsoft.Data.Sqlite.SqliteCommand.GetStatements()+MoveNext()
  at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
  at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
  at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader()
  at Emby.Server.Implementations.Data.SqliteExtensions.Query(SqliteConnection sqliteConnection, String commandText)+MoveNext()
  at Jellyfin.Server.Migrations.Routines.MigrateActivityLogDb.Perform()
  at Jellyfin.Server.Migrations.MigrationRunner.PerformMigrations(IMigrationRoutine[] migrations, MigrationOptions migrationOptions, Action`1 saveConfiguration, ILogger logger)
  at Jellyfin.Server.Migrations.MigrationRunner.Run(CoreAppHost host, ILoggerFactory loggerFactory)
  at Jellyfin.Server.Program.StartServer(IServerApplicationPaths appPaths, StartupOptions options, IConfiguration startupConfig)
[2024-07-02 11:56:13.847 -05:00] [INF] Running query planner optimizations in the database... This might take a while
[2024-07-02 11:56:13.876 -05:00] [INF] Disposing "CoreAppHost"
[2024-07-02 11:56:13.877 -05:00] [INF] Disposing "MusicBrainzArtistProvider"
[2024-07-02 11:56:13.877 -05:00] [INF] Disposing "MusicBrainzAlbumProvider"
[2024-07-02 11:56:13.877 -05:00] [INF] Disposing "PluginManager"

Can the install be saved?
And, I thought the transcoder cache filling the drive was resolved in 10.9. Is there a setting I had to set for it to not fill the drive up?


RE: Migration error after disk full - TheDreadPirate - 2024-07-02

Try renaming all of the XML files in the same directory as migrations.xml (just add .orig or something to the file name).

There is a setting you need to enable to have the transcoder clean up segments.

Dashboard > Playback > check Delete segments.


RE: Migration error after disk full - allDaMedia - 2024-07-03

Thank you, that got the server back online.

I've been looking for the setting to clear out the cache files.
I see a scheduled task to clear the cache directory, but it definitely didn't do that.
I'm the only one accessing the server, so there is only one stream going at a time, and I use it only ones in a while.
The day the server crashed, I had been watching 3 different streams.
I didn't take a snapshot of the cache directory before deleting the files, but linux's locate command still have the file names cached.
There were 250 mp4 files in the directory, that I deleted.

I think I stop a stream correctly as well. I don't use the browser back button, I use the back button within Jellyfin, within the player.
If I understand it correctly, ones a stream is stopped, the cache file should also be removed automatically?
So it looks like that scheduled task was not run.

I did find the setting to delete segments, and I have turned that on.
But is there another setting that needs to be updated?


RE: Migration error after disk full - TheDreadPirate - 2024-07-03

Jellyfin should automatically clean up transcode files when playback is stopped (separate from delete segments). Unless Jellyfin catastrophically crashes.

But there is a separate job, Cleanup Transcode Directory, that runs once a day by default if Jellyfin happens to not cleanup the transcode directory.