Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/content/docs/server/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,26 @@ Every key below is commented out at its default value; uncomment to change it. A

[database]
# file = "<config-dir>/database.sqlite" # env: KOMGA_DATABASE_FILE
# pool-size = 8 # read pool size; default clamp(CPU cores, 8, max-pool-size). env: KOMGA_DATABASE_POOLSIZE
# pool-size = 8 # read pool size; default min(CPU cores, max-pool-size). env: KOMGA_DATABASE_POOLSIZE
# max-pool-size = 16 # env: KOMGA_DATABASE_MAXPOOLSIZE
# journal-mode = "WAL" # WAL/DELETE/TRUNCATE/PERSIST/MEMORY/OFF; env: KOMGA_DATABASE_JOURNALMODE
# busy-timeout = "30s" # default 30s when unset; env: KOMGA_DATABASE_BUSYTIMEOUT
# Task execution (library scan / analysis / hashing / conversion / maintenance)
# uses a dedicated read/write pool over the same database file, so background
# tasks never contend with HTTP/API connections for pool slots. The task write
# pool is a second writer on the file; keep a busy timeout (default 30s) so
# concurrent writes wait instead of failing.
# 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"
# cache_size = "-1820" # page cache per connection, negative = KiB; default: 16 MiB per database split between its connections (512..2048 KiB clamp)

[tasks-db]
# file = "<config-dir>/tasks.sqlite" # env: KOMGA_TASKSDB_FILE; same keys as [database], env prefix KOMGA_TASKSDB
# file = "<config-dir>/tasks.sqlite" # env: KOMGA_TASKSDB_FILE; same keys as [database] but the read pool defaults to 2, env prefix KOMGA_TASKSDB

[kmrs-db]
# file = "<config-dir>/kmrs.sqlite" # kmrs-private state (per-book series metadata contributions, komf integration); env: KOMGA_KMRSDB_FILE; same keys as [database], env prefix KOMGA_KMRSDB
# file = "<config-dir>/kmrs.sqlite" # kmrs-private state (per-book series metadata contributions, komf integration); env: KOMGA_KMRSDB_FILE; same keys as [database] but the read pool defaults to 2, env prefix KOMGA_KMRSDB

[search]
# data-directory = "<config-dir>/lucene" # tantivy index; env: KOMGA_LUCENE_DATA_DIRECTORY
Expand Down
1 change: 1 addition & 0 deletions src/content/docs/server/enhancements/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ 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).
- 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.
Loading