diff options
Diffstat (limited to 'contrib/webmentions-ssg.example.cfg')
| -rw-r--r-- | contrib/webmentions-ssg.example.cfg | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/contrib/webmentions-ssg.example.cfg b/contrib/webmentions-ssg.example.cfg index 9be2cf0..6393b3f 100644 --- a/contrib/webmentions-ssg.example.cfg +++ b/contrib/webmentions-ssg.example.cfg @@ -40,6 +40,35 @@ PROXY_FIX_TRUSTED_HOPS = 0 SQLALCHEMY_DATABASE_URI = "sqlite:////var/lib/webmentions-ssg/webmentions-ssg.db" SQLALCHEMY_TRACK_MODIFICATIONS = False +# Optional SQLite-only tuning. Unspecified keys use the built-in defaults; +# setting a value to None leaves that SQLite PRAGMA unchanged. These settings +# apply to SQLAlchemy connections (including binds), not the separate Huey queue. +# They do not affect PostgreSQL or other SQLAlchemy database backends. +# +# Built-in defaults: foreign_keys=True, journal_mode="WAL", busy_timeout=5000 +# (milliseconds), trusted_schema=False. The remaining settings are None. +# +# WAL requires a file-backed database on a local filesystem. SQLite also needs +# directory write access for the -wal and -shm sidecar files. In-memory SQLite +# ignores journal_mode, wal_autocheckpoint, and journal_size_limit here. +# +# SQLITE_PRAGMAS = { +# "busy_timeout": 10000, # milliseconds waiting for a write lock +# "synchronous": "NORMAL", # faster WAL commits; reduced crash durability +# "cache_size": -8192, # approx. 8 MiB per connection (negative = KiB) +# "wal_autocheckpoint": 1000, # pages; SQLite's built-in default +# "journal_size_limit": 67108864, # bytes of retained journal/WAL storage +# "journal_mode": "WAL", # or "DELETE", "TRUNCATE", "PERSIST" +# "foreign_keys": True, # enforce foreign key constraints +# "trusted_schema": False, # disable untrusted schema functions +# } +# You may also set one key through the environment, for example: +# WEBMENTIONS_SSG_SQLITE_PRAGMAS__CACHE_SIZE=-8192 +# (environment values are parsed as JSON; lower/upper-case keys are accepted). +# Only known PRAGMAs and correctly typed values are accepted at startup. +# "synchronous" also accepts "FULL", "EXTRA" or "OFF" (unsafe); None leaves +# SQLite's choice alone. Optimizer PRAGMA optimize is NOT run at connect time. + # --------------------------------------------------------------------------- # Logging # --------------------------------------------------------------------------- |
