Closed
Bug 539096
Opened 15 years ago
Closed 15 years ago
More than 1 Session query per request
Categories
(addons.mozilla.org Graveyard :: Public Pages, defect)
Tracking
(Not tracked)
RESOLVED
INVALID
5.6
People
(Reporter: jbalogh, Assigned: davedash)
Details
(Whiteboard: [z])
I started printing out all the queries for something else and noticed that there are 11 queries for django_session in one request. Can we fix this easily?
Assignee | ||
Comment 1•15 years ago
|
||
Yeah, did you just find them in the mysql query log?
I think we can probably put the sessions entirely in cache.
Reporter | ||
Comment 2•15 years ago
|
||
I think this is coming from contrib/sessions/backends/db.py:load(). It doesn't show up in the debug toolbar, but it's hitting mysqldb.cursor.execute().
This is the query:
SELECT `django_session`.`session_key`, `django_session`.`session_data`, `django_session`.`expire_date` FROM `django_session` WHERE (`django_session`.`session_key` = '21ada175b4ad22f011e6ee35df7e635d' AND `django_session`.`expire_date` > '2010-01-11 14:56:39' )
Whiteboard: [z]
Reporter | ||
Comment 3•15 years ago
|
||
After some collaborative debugging, we discovered that I was seeing a session query for each media request. That only happens in dev mode when django is serving media, so it's not a big deal.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
Updated•9 years ago
|
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•