2024-08-05, 01:07 PM
(This post was last modified: 2024-08-05, 01:17 PM by finbarberkon. Edited 3 times in total.)
Hello,
I'm having trouble with my Jellyfin setup which I recently setup for the first time.
My setup
I am running jellyfin (v10.9.8) on a Rapsberry Pi (RPi) 4 with a USB SSD directly attached for storage. The Pi has generally been connected to my network via WiFi, though I recently moved it over to Ethernet. The client is the Jellyfin app on "Chromecast with Google TV", which is connected via WiFi. I do not stream from any other devices.
The problem
When I attempt to watch TV or movies, the playback will stop as often as every 5 minutes in the worst case, but at least once per 45 minute TV episode in the best case. The playback stops and the app on the TV will show an error along the lines of "App error. Will retry". Sometimes it successfully retries, but most of the time it fails to resume after 1-2 minutes. If I attempt to back out of the player, and re-start the playback, the app is often very slow and sometimes just completely crashes (there are crash reports included in attachments below). At these times it can even be slow to ssh into the RPi.
My rudimentary debugging
These hangs often occur in close proximity to
Or along with a
(or I'm just reading the logs)
While monitoring with
I've attached the entire contents of /var/log/jellyfin compressed in a zip file. This covers the last 5 or so days of use, since I first setup the server.
Questions
Could you please help me get my jellyfin server working more consistently?
If the logs suggest this is just because my RPi is not powerful enough for my use case, I am happy to upgrade. But I wouldn't want to do so if this is more a software issue.
Thank you :)
I'm having trouble with my Jellyfin setup which I recently setup for the first time.
My setup
I am running jellyfin (v10.9.8) on a Rapsberry Pi (RPi) 4 with a USB SSD directly attached for storage. The Pi has generally been connected to my network via WiFi, though I recently moved it over to Ethernet. The client is the Jellyfin app on "Chromecast with Google TV", which is connected via WiFi. I do not stream from any other devices.
The problem
When I attempt to watch TV or movies, the playback will stop as often as every 5 minutes in the worst case, but at least once per 45 minute TV episode in the best case. The playback stops and the app on the TV will show an error along the lines of "App error. Will retry". Sometimes it successfully retries, but most of the time it fails to resume after 1-2 minutes. If I attempt to back out of the player, and re-start the playback, the app is often very slow and sometimes just completely crashes (there are crash reports included in attachments below). At these times it can even be slow to ssh into the RPi.
My rudimentary debugging
These hangs often occur in close proximity to
SQLite Error 5: 'database is locked'
errors appearing in the jellyfin logs. These can appear immediately after the Failed executing DbCommand
error like this:
[2024-08-05 18:39:46.116 +10:00] [ERR] Failed executing DbCommand ("30,088"ms) [Parameters=["@P10='?' (DbType = Int32), @p0='?' (Size = 32), @p1='?' (Size = 10), @p2='?' (Size = 7), @p3='?' (DbType = DateTime), @p4='?' (DbType = DateTime)
""UPDATE \"Devices\" SET \"AccessToken\" = @p0, \"AppName\" = @p1, \"AppVersion\" = @p2, \"DateCreated\" = @p3, \"DateLastActivity\" = @p4, \"DateModified\" = @p5, \"DeviceId\" = @p6, \"DeviceName\" = @p7, \"IsActive\" = @p8, \"UserId\" =
WHERE \"Id\" = @P10
RETURNING 1;"
[2024-08-05 18:39:46.120 +10:00] [ERR] An exception occurred in the database while saving changes for context type '"Jellyfin.Server.Implementations.JellyfinDbContext"'."
""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.SqliteDataReader.NextResult()
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
[...]
Or along with a
Error processing request
like this:
[2024-08-05 18:40:13.113 +10:00] [ERR] Error processing request. URL "GET" "/videos/fec2cec8-189e-ee83-2f26-9bac1e03917c/hls1/main/25.ts".
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.SqliteDataReader.NextResult()
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
[...]
(or I'm just reading the logs)
While monitoring with
htop
, I can see that the RPi's CPU usage while streaming does not seem excessive. Generally, the CPU usage is <10% but sometimes ffmpeg will run for a while pinning 1 of the 4 CPU cores. I've never seen CPU usage of more than 1 core at 100% and another core at ~20-30%. Though, the fact ssh is slow to respond at these times does seem to suggest the RPi is struggling.I've attached the entire contents of /var/log/jellyfin compressed in a zip file. This covers the last 5 or so days of use, since I first setup the server.
Questions
Could you please help me get my jellyfin server working more consistently?
If the logs suggest this is just because my RPi is not powerful enough for my use case, I am happy to upgrade. But I wouldn't want to do so if this is more a software issue.
Thank you :)