Calvin Spealman
unread,Oct 2, 2009, 10:24:54 PM10/2/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
I've spent all day diagnosing this with no success. I would get random
errors in logs with the traceback below, showing a failure to create a
new session. Memcache logs show all 10000 tries succeeding (I have
also confirmed the empty sessions are still held in cache after). From
what I can see, session.backends.cache tries 10,000 keys that are all
successful, but it thinks they fail and ignores the success. This only
happens in about 1% of requests.
<31 add 980bdad78f56a4d24e0eebf43625918a 1 1209600 6
> NOT FOUND 980bdad78f56a4d24e0eebf43625918a
>31 STORED
<31 get a0948fa9c0add4b803ba85d5939b5a2c
> NOT FOUND a0948fa9c0add4b803ba85d5939b5a2c
>31 END
<31 get a0948fa9c0add4b803ba85d5939b5a2c
> NOT FOUND a0948fa9c0add4b803ba85d5939b5a2c
>31 END
<31 add a0948fa9c0add4b803ba85d5939b5a2c 1 1209600 6
> NOT FOUND a0948fa9c0add4b803ba85d5939b5a2c
>31 STORED
<31 get 74b1dcca57f28779305180995d362136
> NOT FOUND 74b1dcca57f28779305180995d362136
>31 END
<31 get 74b1dcca57f28779305180995d362136
> NOT FOUND 74b1dcca57f28779305180995d362136
>31 END
<31 add 74b1dcca57f28779305180995d362136 1 1209600 6
> NOT FOUND 74b1dcca57f28779305180995d362136
>31 STORED
<31 connection closed.
File "/opt/faircompanies/env/lib/python2.5/site-packages/
flup-1.0.3.dev_20090612-py2.5.egg/flup/server/fcgi_base.py", line 558,
in run
protocolStatus, appStatus = self.server.handler(self)
File "/opt/faircompanies/env/lib/python2.5/site-packages/
flup-1.0.3.dev_20090612-py2.5.egg/flup/server/fcgi_base.py", line
1118, in handler
result = self.application(environ, start_response)
File "/opt/faircompanies/env/lib/python2.5/django/core/handlers/
wsgi.py", line 239, in __call__
response = self.get_response(request)
File "/opt/faircompanies/env/lib/python2.5/django/core/handlers/
base.py", line 67, in get_response
response = middleware_method(request)
File "/opt/faircompanies/fc/django_authopenid/middleware.py", line
11, in process_request
request.openid = request.session.get('openid', None)
File "/opt/faircompanies/env/lib/python2.5/django/contrib/sessions/
backends/base.py", line 63, in get
return self._session.get(key, default)
File "/opt/faircompanies/env/lib/python2.5/django/contrib/sessions/
backends/base.py", line 172, in _get_session
self._session_cache = self.load()
File "/opt/faircompanies/env/lib/python2.5/django/contrib/sessions/
backends/cache.py", line 16, in load
self.create()
File "/opt/faircompanies/env/lib/python2.5/django/contrib/sessions/
backends/cache.py", line 33, in create
raise RuntimeError("Unable to create a new session key.")
RuntimeError: Unable to create a new session key