mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-16 05:43:54 +03:00
Jellyfin Bug Report - Database Initialization Failure #7958
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @JonathanYoung2161 on GitHub (Dec 29, 2025).
Description of the bug
Fresh Jellyfin 10.11.5 installations intermittently fail to initialize the database schema, resulting in a 0-byte
library.dbfile. The database remains completely empty even after completing the first-time setup wizard and adding media libraries. Library scans report successful completion in logs, but no content appears in the UI and database queries fail with "no such table" errors. This appears to be an Entity Framework Core migration system bug affecting initial database creation. Success rate is approximately 33% on first installation attempt, requiring complete purge and reinstall (often multiple times) to eventually succeed.Reproduction steps
Reproduction steps
sudo apt install jellyfin/etc/systemd/system/jellyfin.service.d/override.conf:http://10.0.1.14:8096/media/videos/movies(Movies)/media/videos/tv-shows(Shows)What is the current bug behavior?
/mnt/fileserver/jellyfin/data/data/library.dbis 0 bytes after setup wizard completionjournalctl -u jellyfinlogs - service appears to function normallyTypedBaseItems,Ancestors,__EFMigrationsHistory, etc.) are never createdFrequency: Occurs on approximately 66% of fresh installations (2 out of 3 attempts failed with 0-byte database, 1 succeeded with normal database initialization). Same configuration used for all attempts - only difference is success/failure appears random.
Evidence:
What is the expected correct behavior?
TypedBaseItems(primary media items table)AncestorsAncestorIds__EFMigrationsHistory(migration tracking)Jellyfin Server version
10.11.5
Specify commit id
No response
Specify unstable release number
No response
Specify version number
No response
Specify the build version
10.11.5-1 (Ubuntu 24.04 package from official Jellyfin repository)
Environment
Jellyfin logs
FFmpeg logs
Client / Browser logs
No response
Relevant screenshots or videos
No response
Additional information
Workaround
Complete purge and reinstall procedure (may require 2-3 attempts):
Usually succeeds on 2nd or 3rd attempt with identical configuration. No code changes needed - simply repeating installation procedure eventually results in successful database initialization.
Additional Notes
Suspected Root Cause: Entity Framework Core migration system fails to create
__EFMigrationsHistorytable during initial database initialization, preventing all subsequent table creation. Failure is silent (no errors logged) and appears to be a race condition or timing issue.Impact: Critical for new users - failed first install creates poor initial impression. Unpredictable success rate blocks automated deployments and production migrations from other media servers.
Testing Observations:
/var/lib/jellyfin)Suggested Investigation:
Versions Affected:
This bug has been reproduced 3 times on production hardware with identical configuration. Intermittent failure (66% failure rate) suggests race condition or non-deterministic initialization issue rather than configuration problem.
@JonathanYoung2161 commented on GitHub (Dec 29, 2025):
After 3 weeks of endless issues I have migrated back to Plex for now. I want to retry Jellyfin in the future!!!
@theguymadmax commented on GitHub (Jan 2, 2026):
Jellyfin 10.11.x no longer creates a
library.db. Everything is now injellyfin.db