tune SQLite PRAGMAs for production
Some checks failed
deploy / deploy (push) Has been cancelled

Add journal_size_limit (64MB), default_transaction_mode: :immediate,
and mmap_size (128MB) across dev, test, and prod configs. Benchmarks
showed IMMEDIATE mode eliminates transaction upgrade BUSY errors and
mmap improves read throughput.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jamey
2026-02-22 09:23:41 +00:00
parent 162bf4ca53
commit 19d8c7d0fd
3 changed files with 11 additions and 2 deletions

View File

@@ -15,7 +15,10 @@ config :berrypod, Berrypod.Repo,
journal_mode: :wal,
busy_timeout: 15_000,
queue_target: 5_000,
queue_interval: 10_000
queue_interval: 10_000,
journal_size_limit: 67_108_864,
default_transaction_mode: :immediate,
custom_pragmas: [mmap_size: 134_217_728]
# We don't run a server during test. If one is required,
# you can enable the server option below.