Jellyfin Forum
Custom k8s config has jellyfins database locked - 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: Custom k8s config has jellyfins database locked (/t-custom-k8s-config-has-jellyfins-database-locked)



Custom k8s config has jellyfins database locked - SpiderUnderUrBed - 2025-03-30

https://pastebin.com/qfZJs0uh
^ How come, when i run this config, and after my custom image of jellyfin builds (I am using a custom image because I kept on getting errors with jellyfins provided images). I get the error:
Code:
[font=monospace][color=#000000][07:22:33] [INF] [4] Jellyfin.Networking.Manager.NetworkManager: Filtered subnets: [] [/color]
[07:22:35] [INF] [4] Emby.Server.Implementations.ApplicationHost: There are pending EFCore migrations in the database. Applying... (This may take a while, do not
stop Jellyfin)
[07:23:05] [ERR] [4] Microsoft.EntityFrameworkCore.Database.Command: Failed executing DbCommand (30,022ms) [Parameters=[], CommandType='Text', CommandTimeout='30'
]
PRAGMA journal_mode = 'wal';
[07:23:05] [FTL] [4] Main: Error while starting server
Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'.
  at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
  at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
  at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
  at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader()
  at Microsoft.Data.Sqlite.SqliteCommand.ExecuteNonQuery()
  at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQuery(RelationalCommandParameterObject parameterObject)
  at Microsoft.EntityFrameworkCore.Sqlite.Storage.Internal.SqliteDatabaseCreator.Create()
  at Microsoft.EntityFrameworkCore.Storage.RelationalDatabaseCreator.CreateAsync(CancellationToken cancellationToken)
  at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.MigrateAsync(String targetMigration, CancellationToken cancellationToken)
  at Emby.Server.Implementations.ApplicationHost.InitializeServices()
  at Emby.Server.Implementations.ApplicationHost.InitializeServices()
  at Jellyfin.Server.Program.StartServer(IServerApplicationPaths appPaths, StartupOptions options, IConfiguration startupConfig)
[07:23:05] [INF] [4] Main: Running query planner optimizations in the database... This might take a while
[07:23:05] [INF] [4] Emby.Server.Implementations.ApplicationHost: Disposing CoreAppHost
[07:23:05] [INF] [4] Emby.Server.Implementations.ApplicationHost: Disposing PluginManager
[/font]
There is no pods, no other pods that is using the database, jellyfins database just immediately locks up.


RE: Custom k8s config has jellyfins database locked - TheDreadPirate - 2025-03-30

Do you have the playback reporting plugin installed?


RE: Custom k8s config has jellyfins database locked - SpiderUnderUrBed - 2025-03-30

@TheDreadPirate
How do I check that?
Here is the full logs incase its in here:
https://pastebin.com/0Dvcju7E

The webui isnt opening since its crashing, here is my config folder, idk if that helps:
[spiderunderurbed@extranucConfused-facemnt/media/jellyfin/config]$ ls
config data log metadata


RE: Custom k8s config has jellyfins database locked - TheDreadPirate - 2025-03-31

Go to where you mounted /config and go to /config/plugins.


RE: Custom k8s config has jellyfins database locked - SpiderUnderUrBed - 2025-03-31

(2025-03-30, 05:48 PM)SpiderUnderUrBed Wrote: @TheDreadPirate
How do I check that?
Here is the full logs incase its in here:
https://pastebin.com/0Dvcju7E

The webui isnt opening since its crashing, here is my config folder, idk if that helps:
[spiderunderurbed@extranucConfused-facemnt/media/jellyfin/config]$ ls
config  data  log  metadata

(2025-03-31, 12:21 AM)TheDreadPirate Wrote: Go to where you mounted /config and go to /config/plugins.

I do not have a plugins directory, initially when i first got this error, i thought about rm'ing config, and have it regenerate when i next restarted it, it did not regenerate. Could I manually initilize jellyfin in that directory? Would that fix it, Or is the issue elsewhere? (the plugins directory did not regenerate, everything else in config did, i assume)


RE: Custom k8s config has jellyfins database locked - TheDreadPirate - 2025-03-31

Another thing to check is whether the user running the container has full read/write permissions to what /config is. The fact that you don't have a plugins directory is a good indicator that this is a permissions issue.