• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting App error and playback pausing with RPi4 & Google TV

     
    • 0 Vote(s) - 0 Average

    App error and playback pausing with RPi4 & Google TV

    finbarberkon
    Offline

    Junior Member

    Posts: 2
    Threads: 1
    Joined: 2024 Aug
    Reputation: 0
    Country:Australia
    #1
    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 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 :)


    Attached Files
    .gz   jellyfin.tar.gz (Size: 419.94 KB / Downloads: 70)
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2024-08-05, 02:10 PM
    Is the SSD only hosting the media or is Jellyfin running off of it?
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    finbarberkon
    Offline

    Junior Member

    Posts: 2
    Threads: 1
    Joined: 2024 Aug
    Reputation: 0
    Country:Australia
    #3
    2024-08-09, 12:53 PM (This post was last modified: 2024-08-09, 12:59 PM by finbarberkon. Edited 3 times in total.)
    The SSD was only hosting the media, but the issue still seems to have been with the Raspberry Pi.

    I did some further testing and everything pointed to the Pi being the bottleneck. So I decided to buy a more powerful computer to host the server (an Intel N100 platform mini PC as suggested in the docs). So far it seems to be working flawlessly.

    The error messages were very confusing, though. They really didn't point me towards issues with the hardware. But on the new hardware they don't show up, and there's no issues with playback. So perhaps SQLite Error 5: 'database is locked' errors can be a symptom for the hardware not being sufficient to run Jellyfin.

    I'm not sure what exactly the problem was, but the issue is now resolved with new hardware :)
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #4
    2024-08-09, 02:51 PM
    (2024-08-09, 12:53 PM)finbarberkon Wrote: I'm not sure what exactly the problem was, but the issue is now resolved with new hardware Smiling-face

    More power solves all problems.

       
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    1
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode