#16484: Duplicate entry sessions error
-----------------------+----------------------------------
 Reporter:  hash.3g@…  |          Owner:  nobody
     Type:  Bug        |         Status:  new
Milestone:             |      Component:  contrib.sessions
  Version:  1.3        |       Severity:  Normal
 Keywords:             |   Triage Stage:  Unreviewed
Has patch:  0          |  Easy pickings:  0
    UI/UX:  0          |
-----------------------+----------------------------------
 Hi, Sometimes we receive "duplicate entry" error from django sessions. See
 Traceback.

 {{{
 Traceback (most recent call last):

 File "/usr/local/lib/python2.6/dist-
 packages/django/core/handlers/base.py", line 178, in get_response
   response = middleware_method(request, response)
 File "/usr/local/lib/python2.6/dist-
 packages/django/contrib/sessions/middleware.py", line 36, in
 process_response
   request.session.save()
 File "/usr/local/lib/python2.6/dist-
 packages/django/contrib/sessions/backends/db.py", line 63, in save
   obj.save(force_insert=must_create, using=using)
 File "/usr/local/lib/python2.6/dist-packages/django/db/models/base.py",
 line 460, in save
   self.save_base(using=using, force_insert=force_insert,
 force_update=force_update)
 File "/usr/local/lib/python2.6/dist-packages/django/db/models/base.py",
 line 553, in save_base
   result = manager._insert(values, return_id=update_pk, using=using)
 File "/usr/local/lib/python2.6/dist-packages/django/db/models/manager.py",
 line 195, in _insert
   return insert_query(self.model, values, **kwargs)
 File "/usr/local/lib/python2.6/dist-packages/django/db/models/query.py",
 line 1436, in insert_query
   return query.get_compiler(using=using).execute_sql(return_id)
 File "/usr/local/lib/python2.6/dist-
 packages/django/db/models/sql/compiler.py", line 791, in execute_sql
   cursor = super(SQLInsertCompiler, self).execute_sql(None)
 File "/usr/local/lib/python2.6/dist-
 packages/django/db/models/sql/compiler.py", line 735, in execute_sql
   cursor.execute(sql, params)
 File "/usr/local/lib/python2.6/dist-
 packages/django/db/backends/mysql/base.py", line 86, in execute
   return self.cursor.execute(query, args)
 File "/usr/lib/pymodules/python2.6/MySQLdb/cursors.py", line 166, in
 execute
   self.errorhandler(self, exc, value)
 File "/usr/lib/pymodules/python2.6/MySQLdb/connections.py", line 35, in
 defaulterrorhandler
   raise errorclass, errorvalue
 IntegrityError: (1062, “Duplicate entry ‘e110c3788ccb21c76865285446102338’
 for key 'PRIMARY'”)
 }}}

 Periodically we do cleaning of out-of-date sessions, but it does not help
 from current error.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16484>
Django <https://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.

Reply via email to