[GH-ISSUE #381] SESSION_COOKIE_AGE #291

Closed
opened 2026-02-26 10:30:35 +03:00 by kerem · 0 comments
Owner

Originally created by @ThomasWaldmann on GitHub (Oct 18, 2018).
Original GitHub issue: https://github.com/nsupdate-info/nsupdate.info/issues/381

Originally assigned to: @ThomasWaldmann on GitHub.

It seems that this setting (default: 14 days) leads to a huge amount of sessions in the session store.

After migrating the session store to the file-based backend, I did a drop table django_session ; vacuum and the db lost 95% of its size (I also did vacuum before, so this really accounts to deleted sessions).

I run django-admin cleansessions daily via cron-script, but that doesn't help if a huge amount of sessions with a relatively long life-time accumulate.

So, guess we should add something like SESSION_COOKIE_AGE = 10 * 3600 to the default configuration as a more sane default.

Originally created by @ThomasWaldmann on GitHub (Oct 18, 2018). Original GitHub issue: https://github.com/nsupdate-info/nsupdate.info/issues/381 Originally assigned to: @ThomasWaldmann on GitHub. It seems that this setting (default: 14 days) leads to a huge amount of sessions in the session store. After migrating the session store to the file-based backend, I did a `drop table django_session ; vacuum` and the db lost 95% of its size (I also did vacuum before, so this really accounts to deleted sessions). I run `django-admin cleansessions` daily via cron-script, but that doesn't help if a huge amount of sessions with a relatively long life-time accumulate. So, guess we should add something like `SESSION_COOKIE_AGE = 10 * 3600` to the default configuration as a more sane default.
kerem closed this issue 2026-02-26 10:30:36 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nsupdate.info-nsupdate-info#291
No description provided.