#14093: Unable to create a new session key on higher traffic
----------------------------------------------+-----------------------------
Reporter: [email protected] | Owner: nobody
Status: new | Milestone:
Component: django.contrib.sessions | Version: 1.2
Resolution: | Keywords: session, cache,
session key
Stage: Accepted | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
----------------------------------------------+-----------------------------
Changes (by dmoisset):
* needs_better_patch: => 0
* stage: Unreviewed => Accepted
* needs_tests: => 0
* needs_docs: => 0
Comment:
This seems to be related to #8311, which was fixed in [8620]
{{{
# Because a cache can fail silently (e.g. memcache), we don't know
if
# we are failing to create a new session because of a key
collision or
# because the cache is missing. So we try for a (large) number of
times
# and then raise an exception. That's the risk you shoulder if
using
# cache backing.
for i in xrange(10000):
}}}
Anyway, that magic 10000 sounds like a code smell at least, probably the
value should be adjustable for different server loads?
Flagging as accepted, at least a comment explaining the consecuences of
that 10000 (what makes it different from 1000 or 100000?) should be added
--
Ticket URL: <http://code.djangoproject.com/ticket/14093#comment:1>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.