OperationalError: (1213, 'Deadlock found when trying to get lock; try restarting transaction')

RESOLVED WONTFIX

Status

RESOLVED WONTFIX
7 years ago
6 years ago

People

(Reporter: retornam, Unassigned)

Tracking

Details

(URL)

(Reporter)

Description

7 years ago
Traceback (most recent call last):

  File "/data/www/developer.mozilla.org/kuma/vendor/src/django/django/core/handlers/base.py", line 100, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/data/www/developer.mozilla.org/kuma/vendor/src/django-waffle/waffle/decorators.py", line 20, in _wrapped_view
    return view(request, *args, **kwargs)

  File "/data/www/developer.mozilla.org/kuma/vendor/src/django/django/views/decorators/http.py", line 37, in inner
    return func(request, *args, **kwargs)

  File "/data/www/developer.mozilla.org/kuma/apps/wiki/views.py", line 159, in process
    return func(request, *args, **kwargs)

  File "/data/www/developer.mozilla.org/kuma/vendor/src/django/django/views/decorators/http.py", line 124, in inner
    response = func(request, *args, **kwargs)

  File "/data/www/developer.mozilla.org/kuma/vendor/src/django/django/db/transaction.py", line 271, in _autocommit
    return func(*args, **kw)

  File "/data/www/developer.mozilla.org/kuma/apps/wiki/views.py", line 383, in document
    .select_related('creator')])

  File "/data/www/developer.mozilla.org/kuma/vendor/src/django/django/db/models/query.py", line 105, in _result_iter
    self._fill_cache()

  File "/data/www/developer.mozilla.org/kuma/vendor/src/django/django/db/models/query.py", line 783, in _fill_cache
    self._result_cache.append(self._iter.next())

  File "/data/www/developer.mozilla.org/kuma/vendor/src/django-cache-machine/caching/base.py", line 112, in __iter__
    self.cache_objects(to_cache)

  File "/data/www/developer.mozilla.org/kuma/vendor/src/django-cache-machine/caching/base.py", line 120, in cache_objects
    invalidator.cache_objects(objects, query_key, query_flush)

  File "/data/www/developer.mozilla.org/kuma/vendor/src/django-cache-machine/caching/invalidation.py", line 100, in cache_objects
    self.add_to_flush_list(flush_lists)

  File "/data/www/developer.mozilla.org/kuma/vendor/src/django-cache-machine/caching/invalidation.py", line 133, in add_to_flush_list
    cache.set_many(flush_lists)

  File "/data/www/developer.mozilla.org/kuma/vendor/src/django/django/core/cache/backends/base.py", line 113, in set_many
    self.set(key, value, timeout)

  File "/data/www/developer.mozilla.org/kuma/vendor/src/django/django/core/cache/backends/db.py", line 70, in set
    self._base_set('set', key, value, timeout)

  File "/data/www/developer.mozilla.org/kuma/vendor/src/django/django/core/cache/backends/db.py", line 88, in _base_set
    self._cull(db, cursor, now)

  File "/data/www/developer.mozilla.org/kuma/vendor/src/django/django/core/cache/backends/db.py", line 139, in _cull
    cursor.execute("DELETE FROM %s WHERE cache_key < %%s" % table, [cursor.fetchone()[0]])

  File "/data/www/developer.mozilla.org/kuma/vendor/src/django/django/db/backends/mysql/base.py", line 86, in execute
    return self.cursor.execute(query, args)

  File "/usr/lib64/python2.6/site-packages/MySQLdb/cursors.py", line 173, in execute
    self.errorhandler(self, exc, value)

  File "/usr/lib64/python2.6/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue

OperationalError: (1213, 'Deadlock found when trying to get lock; try restarting transaction')
(Reporter)

Comment 1

7 years ago
This happened about 26 times
This goes away when we go back to memcache backend, which we're already working on bug 772468
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → WONTFIX
Version: MDN → unspecified
Component: Website → Landing pages
Product: Mozilla Developer Network → Mozilla Developer Network
You need to log in before you can comment on or make changes to this bug.