Skip to content

Fix/session store cleanup interval#1

Open
jee7s wants to merge 9 commits into
mainfrom
fix/session-store-cleanup-interval
Open

Fix/session store cleanup interval#1
jee7s wants to merge 9 commits into
mainfrom
fix/session-store-cleanup-interval

Conversation

@jee7s

@jee7s jee7s commented Apr 8, 2026

Copy link
Copy Markdown

No description provided.

jee7s and others added 9 commits April 7, 2026 22:47
connect-session-knex defaults to running a DELETE on expired sessions
every 60 seconds. Set clearInterval to 3600000ms to reduce DB churn.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Expose DB connection pool minimum and session store cleanup interval
as configurable options under the db: config block. Defaults are
min=2 and sessionCleanupInterval=86400000 (1 day).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Keeps the data.yml default at the original connect-session-knex value.
Users can override to a longer interval (e.g. 86400000) in config.yml.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…container config

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Caches the DB health check result and re-queries at most once per
interval (default 4 hours) to avoid keeping the connection alive.
Configurable via db.healthCheckInterval in config.yml or
DB_HEALTH_CHECK_INTERVAL env var in containers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Move /healthz before Passport middleware so healthchecks don't trigger deserializeUser
- Cache deserialized users in memory (default 4h, configurable via auth.userCacheTTL / AUTH_USER_CACHE_TTL)
- Increase analytics cache TTL default to 1 day (configurable via analytics.cacheTTL / ANALYTICS_CACHE_TTL)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…are dependency

Moving all of ctrl.common early caused req.i18n to be undefined for page
routes since localization middleware hadn't run yet. Now only /healthz
is registered early; ctrl.common remains in its original position.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant