Cache location config - Duvel - 2024-10-28
Hi
I am gonna mount a new server this week, with more SDD storage capacity and I plan to reconfigure Jellyfin transcode directory to give it a standalone SDD disk to avoid some issues I had with it in the past.
So the config is DELL pro refurbished hardware running SDD and HDD RAIDs will Dell Idrac, and vmware ESXi installed on it, running Ubuntu VM and Jellyfin in docker (and many other things)
I read that it is a good idea to not have the transcode dir and sqlite DB on the same disk, is it correct ?
If so I would like to know what is the best config approach:
1. Should I move all the /cache directory on the dedicated disk, or only the /cache/transcode directory?
2. How to define this??? With a a new volume in the docker-compose ? Or using the /config/system.xml where I found this line
Code: <CachePath>/var/cache/jellyfin</CachePath>
Any other disk split advices config welcome
RE: Cache location config - TheDreadPirate - 2024-10-28
If you enable the delete segments feature, you shouldn't need to worry about transcodes filling up your disk. As long as there is a reasonable amount of free space for your user count. The database being on the same disk as the transcode directory is fine as long as it is a SSD.
RE: Cache location config - Duvel - 2024-10-31
Ok but since version 10 I still have recuurent DB locks.
Example this morning
Code: [12:28:48] [ERR] Error processing request. URL GET /UserItems/Resume.
Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'.
at Microsoft.Data.Sqlite.SqliteDataRecord.Dispose()
at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
at System.Data.Common.DbDataReader.NextResultAsync(CancellationToken cancellationToken)
--- End of stack trace from previous location ---
at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
at Jellyfin.Server.Implementations.Devices.DeviceManager.UpdateDevice(Device device)
at Jellyfin.Server.Implementations.Devices.DeviceManager.UpdateDevice(Device device)
at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString)
at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString)
at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfo(HttpRequest requestContext)
at Emby.Server.Implementations.HttpServer.Security.AuthService.Authenticate(HttpRequest request)
at Jellyfin.Api.Auth.CustomAuthenticationHandler.HandleAuthenticateAsync()
at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.AuthenticateAsync()
at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Jellyfin.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
at Jellyfin.Api.Middleware.ExceptionMiddleware.Invoke(HttpContext context)
And when this happens I have to restart the server
At first glance I thought the V101.10 had fixed them since my server was much more stable for a few days, but as you can see its still happens.
I have stopped asking for help regarding this as I am not the only one having the problem (for users having an infra of several servers...) and there's no solution (I do use nfs drives)
So anything that could minimize the locks like having the DB on a standonle SDD is a gain for me.
I just hope the MariaDB or Postgress version will land one day....
RE: Cache location config - TheDreadPirate - 2024-10-31
Maybe 10.11 for external DBs like PostgreSQL. A big PR is being worked on enable this.
https://github.com/jellyfin/jellyfin/pull/12798
But, like with most FOSS projects, there is no guarantee on a timeline.
Also, are your databases on a NFS share?
RE: Cache location config - Duvel - 2024-11-04
The DB and the whole Jellyfin config is not on a NFS share. Its on the ubuntu system disk which is a SDD of 100 Go
COnstant locks continue. I have to restart the server mostly everyday.
Note that I do have Jellyseer and Jelyseer on the same server interracting with Jellyfin and Sonarr/radarr on another server but they do it from the API.
RE: Cache location config - gnattu - 2024-11-04
Do you have the plugin playback reporting installed? that one has a very bad db access pattern and will cause locking much more frequently
|