Closed Bug 660167 Opened 13 years ago Closed 13 years ago

[traceback] OperationalError: (1205, 'Lock wait timeout exceeded; try restarting transaction') when adding a collection to your favorites

Categories

(addons.mozilla.org Graveyard :: Collections, defect)

defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: stephend, Unassigned)

References

()

Details

(Whiteboard: [fromAutomation])

STR:

1. Load https://addons.allizom.org/en-US/firefox/addon/read-it-later/
2. Log in, click "Add to Favorites"
3. Wait a few lightyears:

--
[01:20:29.336] POST https://addons.allizom.org/en-US/firefox/collections/stephend/favorites/add [HTTP/1.1 500 INTERNAL SERVER ERROR 60131ms]

Traceback (most recent call last):

  File "/data/amo_python/www/preview/zamboni/vendor/src/django/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/data/amo_python/www/preview/zamboni/apps/amo/decorators.py", line 82, in wrapper
    return f(*args, **kw)

  File "/data/amo_python/www/preview/zamboni/apps/amo/decorators.py", line 74, in wrapper
    return f(*args, **kw)

  File "/data/amo_python/www/preview/zamboni/apps/amo/decorators.py", line 29, in wrapper
    return func(request, *args, **kw)

  File "/data/amo_python/www/preview/zamboni/apps/amo/decorators.py", line 50, in wrapper
    return f(request, *args, **kw)

  File "/data/amo_python/www/preview/zamboni/apps/bandwagon/views.py", line 323, in collection_alter
    return change_addon(request, c, action)

  File "/data/amo_python/www/preview/zamboni/apps/bandwagon/views.py", line 335, in change_addon
    getattr(collection, action + '_addon')(addon)

  File "/data/amo_python/www/preview/zamboni/apps/bandwagon/models.py", line 313, in add_addon
    self.save()  # To invalidate Collection.

  File "/data/amo_python/www/preview/zamboni/apps/bandwagon/models.py", line 170, in save
    super(Collection, self).save(**kw)

  File "/data/amo_python/www/preview/zamboni/vendor/src/django/django/db/models/base.py", line 463, in save
    self.save_base(using=using, force_insert=force_insert, force_update=force_update)

  File "/data/amo_python/www/preview/zamboni/vendor/src/django/django/db/models/base.py", line 529, in save_base
    rows = manager.using(using).filter(pk=pk_val)._update(values)

  File "/data/amo_python/www/preview/zamboni/vendor/src/django/django/db/models/query.py", line 491, in _update
    return query.get_compiler(self.db).execute_sql(None)

  File "/data/amo_python/www/preview/zamboni/vendor/src/django/django/db/models/sql/compiler.py", line 884, in execute_sql
    cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)

  File "/data/amo_python/www/preview/zamboni/vendor/src/django/django/db/models/sql/compiler.py", line 750, in execute_sql
    cursor.execute(sql, params)

  File "/data/amo_python/www/preview/zamboni/vendor/src/django/django/db/backends/mysql/base.py", line 86, in execute
    return self.cursor.execute(query, args)

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

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

OperationalError: (1205, 'Lock wait timeout exceeded; try restarting transaction')
Whiteboard: [fromAutomation]
I couldn't reproduce this.  This type of error (similar to the "can't connect to mysql" is going to be transient and hard to find/fix.  For all we know IT was doing something to the box at the time.
(In reply to comment #1)
> I couldn't reproduce this.  This type of error (similar to the "can't
> connect to mysql" is going to be transient and hard to find/fix.  For all we
> know IT was doing something to the box at the time.

While I can't reproduce the 500 error/exception, we're still seeing the Ajax calls being really slow at times:

--
[12:20:47.928] POST https://addons.allizom.org/en-US/firefox/collections/stephend/favorites/remove [HTTP/1.1 302 FOUND 14744ms]
(In reply to comment #2)

Er, sorry, more like this:

--
[12:01:31.712] GET https://addons.allizom.org/en-US/firefox/collections/ajax/list?addon_id=7661 [HTTP/1.1 200 OK 472175ms]
That's bug 668061
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.