• 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 SQL not using WAL on 12.0rc2?

     
    • 0 Vote(s) - 0 Average

    SQL not using WAL on 12.0rc2?

    kagetsu
    Offline

    Member

    Posts: 54
    Threads: 17
    Joined: 2023 Aug
    Reputation: 1
    Country:United States
    #1
    2026-07-09, 02:34 PM
    Having constant Database is locked errors until I changed a few things.

    Jellyfin server is located on a QNAP TS-853 Pro (Intel Celeron 4 core Turbo 2.42ghz).
    Noticed that no -shm or -wal files.
    Stopped the Docker instance.
    Opened jellyfin.db with DB Browser in SQLite.
    On Tab Execute SQL:

    Executed:
    PRAGMA main.page_size = 4096;
    PRAGMA main.cache_size=10000;
    PRAGMA main.locking_mode=EXCLUSIVE;
    PRAGMA main.synchronous=NORMAL;
    PRAGMA main.temp_store = MEMORY;
    pragma mmap_size = 30000000000;
    pragma vacuum;
    pragma optimize;

    Closed DB file saving changes.

    Restarted instance and the entire interface sped up. No more Database is locked.

    shm and wal files are present.

    Is this safe? Was there a reason why the DB is set to "delete" instead of "WAL" like is it a change in 12.0 and designed this way?

    Images load so much faster. Selecting a movie is so much faster...
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,693
    Threads: 11
    Joined: 2023 Jun
    Reputation: 473
    Country:United States
    #2
    2026-07-09, 03:02 PM
    shm and wal are used in JF12-RC2.

    From my RC2 test container.

    Code:
    chris@rat-trap:/opt/docker/matrix/data/log$ ll /opt/docker/jellyfin-testing/config/data/
    total 856412
    drwxr-xr-x 258 media chris      4096 Oct 26  2025 attachments/
    drwxr-xr-x   2 media media      4096 Nov 12  2025 backups/
    drwxr-xr-x   5 media chris      4096 Jan 20 20:58 collections/
    -rw-r--r--   1 media chris        35 Aug 15  2023 device.txt
    drwxr-xr-x   2 media media      4096 Jun 30 16:55 introskipper/
    -rwxr--r--   1 media chris 834248704 Jul  9 03:47 jellyfin.db*
    -rwxr--r--   1 media media     32768 Jul  9 10:58 jellyfin.db-shm*
    -rwxr--r--   1 media media         0 Jul  9 03:47 jellyfin.db-wal*
    drwxr-xr-x   2 media chris      4096 Sep  9  2024 livetv/
    drwxr-xr-x   2 media media      4096 Jun 28 12:15 newsletterImages/
    -rw-r--r--   1 media media  37847040 Jun 28 12:15 newsletters.db
    -rw-r--r--   1 media chris   1011712 Jul  9 00:00 playback_reporting.db
    drwxr-xr-x   8 media chris      4096 Jun 11 10:05 playlists/
    drwxr-xr-x   2 media chris      4096 Jun 16 10:40 ScheduledTasks/
    -rw-r--r--   1 media chris   3772333 Jul  9 03:19 splashscreen.png
    drwxr-xr-x   2 media media      4096 Jul  1 18:12 SQLiteBackups/
    drwxr-xr-x 258 media chris      4096 Oct 26  2025 subtitles/
    drwxr-xr-x 258 media media      4096 Oct 26  2025 trickplay/

    The only change I've made is to the database locking behavior (default is NoLock and is now set to Optimistic). BUT shm and wal were also present when the database locking behavior was NoLock.

    Is Jellyfin's DB stored on a HDD or SDD?
    Jellyfin 10.11.11 (Docker)
    Debian 13 w/Xanmod amd64v3 LTS kernel
    AMD Ryzen 5500 w/32GB DDR4
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    ZFS Storage pool
        vdev1 - 6x WD Red Pro 6TB CMR in RAIDZ1
        vdev2 - 3x WD Red Pro 18TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    kagetsu
    Offline

    Member

    Posts: 54
    Threads: 17
    Joined: 2023 Aug
    Reputation: 1
    Country:United States
    #3
    2026-07-09, 03:21 PM
    I must've caused my own problems at some point then. I just noticed back in April I have a bunch of notes I was exploring to try and stop the Database is locked issue...

    Is there some way to modify PRAGMA flags in the jellyfin files or is it a normal thing where it's set by jellyfin upon DB creation and has to be modified by setting it while it's offline and vacuuming it?
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,693
    Threads: 11
    Joined: 2023 Jun
    Reputation: 473
    Country:United States
    #4
    2026-07-09, 03:28 PM
    I'd imagine all of that is set when jellyfin first initializes the DB or when applying migrations during JF upgrades.
    Jellyfin 10.11.11 (Docker)
    Debian 13 w/Xanmod amd64v3 LTS kernel
    AMD Ryzen 5500 w/32GB DDR4
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    ZFS Storage pool
        vdev1 - 6x WD Red Pro 6TB CMR in RAIDZ1
        vdev2 - 3x WD Red Pro 18TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    « Next Oldest | Next Newest »

    Users browsing this thread: 2 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