diff --git a/src/content/docs/server/configuration.mdx b/src/content/docs/server/configuration.mdx index 064a82d..e324cde 100644 --- a/src/content/docs/server/configuration.mdx +++ b/src/content/docs/server/configuration.mdx @@ -35,8 +35,8 @@ Every key below is commented out at its default value; uncomment to change it. A # concurrent writes wait instead of failing. The task read pool defaults to 2 # connections — task work is serial per worker (TASK_POOL_SIZE defaults to 1); # an explicit pool-size applies to the task pool too. -# [database.pragmas] # extra SQLite pragmas, TOML only -# synchronous = "NORMAL" +# [database.pragmas] # extra SQLite pragmas, TOML only. synchronous defaults to NORMAL in WAL mode, FULL otherwise +# synchronous = "FULL" # cache_size = "-1820" # page cache per connection, negative = KiB; default: 16 MiB per database split between its connections (512..2048 KiB clamp) [tasks-db] diff --git a/src/content/docs/server/enhancements/index.mdx b/src/content/docs/server/enhancements/index.mdx index e9fae0c..97fc5dd 100644 --- a/src/content/docs/server/enhancements/index.mdx +++ b/src/content/docs/server/enhancements/index.mdx @@ -30,5 +30,6 @@ Intentional differences from the Java behavior: - `GET /actuator/sessions` without `?username=` lists all sessions (Java rejects it). - `/api/v1/books/{bookId}/next` and `/previous` break `numberSort` ties by book id; Java's tie-handling is unstable — see [Next/previous navigation](/server/enhancements/next-previous). - Memory is bounded regardless of CPU cores: 16 MiB SQLite page-cache budget per database (`cache_size` pragma overrides), and `malloc` arenas capped at 2 on Linux/glibc (`MALLOC_ARENA_MAX` overrides; `1` saves more on tiny boxes but serializes C-side allocation). +- `synchronous` defaults to `NORMAL` in WAL mode (Java: SQLite's `FULL`): commits no longer fsync, so write bursts (komf full-library match, scans) don't saturate the disk; a power loss can roll back the last committed transactions but cannot corrupt the database. `[database.pragmas] synchronous = "FULL"` restores Java behavior. - SQL statements that run 500 ms or longer are logged at WARN with their text (log target `komga_db::slow_query`); lock waits count toward the time, so lock-starved writers show up too. The Java version has no slow-query log. - Collection/read list covers: adaptive collage of up to 4 member covers (1 full, 2 side-by-side, 3 = 1 tall + 2 stacked, 4 = 2×2) on a blurred, dimmed blowup of the first cover (neutral gray when no cover is available); Java renders a fixed 2×2 grid on black, cycling members.