Session database can bottleneck
Bug #490239 reported by
Stuart Bishop
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
High
|
Stuart Bishop |
Bug Description
Even if just reading an old (>9 mins) session, its _sweep method is invoked to clean out old data.
Under conditions of high load this can lead to a backlog of requests attempting to clean out all the old session data.
We should decrease the precision in pgsession.py to several hours and increase the fuzz to a couple of hours.
Related branches
lp://qastaging/~stub/launchpad/bug-490239-session-tuning
- Guilherme Salgado (community): Approve (release-critical)
- Graham Binns (community): Approve (code)
-
Diff: 120 lines (+2/-80)2 files modifiedlib/canonical/launchpad/webapp/pgsession.py (+2/-19)
lib/canonical/launchpad/webapp/tests/test_pgsession.py (+0/-61)
Changed in launchpad-foundations: | |
assignee: | nobody → Stuart Bishop (stub) |
importance: | Undecided → High |
milestone: | none → 3.1.11 |
status: | New → Triaged |
tags: | added: current-rollout-blocker |
Changed in launchpad-foundations: | |
status: | Triaged → In Progress |
Changed in launchpad-foundations: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Better yet, we should stop sweeping altogether and prune the session data with external scripts.
I've updated the production session pruner to handle this better (session-prune.py), so we can now remove the _sweep code from pgsession.py. Bug #357516 involves moving this garbo-daily.py so it will be in the Launchpad tree.