[Bug 1091586] Re: Frequent OperationalError: database is locked with sqlite

Aurélien Bompard aurelien at bompard.org
Tue Dec 18 12:10:05 CET 2012


I just restarted Mailman and got two tracebacks at exactly the same
time, from two different processes (the PID number is logged too). Could
Mailman be unqueuing from the pipeline queue in parallel processes ?
Could that cause the SQLite lock ?

For reference, the two tracebacks in the log :

Dec 18 05:05:38 2012 (31146) Uncaught runner archive exception: database is locked
Dec 18 05:05:38 2012 (31146) Traceback (most recent call last):
  File "/srv/dev/mailman/mailman3/mailman/src/mailman/core/runner.py", line 138, in _one_iteration
    self._process_one_file(msg, msgdata)
  File "/srv/dev/mailman/mailman3/mailman/src/mailman/core/runner.py", line 194, in _process_one_file
    else getUtility(IListManager).get(unicode(listname)))
  File "/srv/dev/mailman/mailman3/mailman/src/mailman/database/transaction.py", line 78, in wrapper
    return function(args[0], config.db.store, *args[1:], **kws)
  File "/srv/dev/mailman/mailman3/mailman/src/mailman/model/listmanager.py", line 69, in get
    return store.find(MailingList, MailingList._list_id == list_id).one()
  File "/srv/dev/mailman/lib/python2.6/site-packages/storm-0.19-py2.6-linux-x86_64.egg/storm/store.py", line 1142, in one
    result = self._store._connection.execute(select)
  File "/srv/dev/mailman/lib/python2.6/site-packages/storm-0.19-py2.6-linux-x86_64.egg/storm/database.py", line 238, in execute
    raw_cursor = self.raw_execute(statement, params)
  File "/srv/dev/mailman/lib/python2.6/site-packages/storm-0.19-py2.6-linux-x86_64.egg/storm/databases/sqlite.py", line 154, in raw_execute
    return Connection.raw_execute(self, statement, params)
  File "/srv/dev/mailman/lib/python2.6/site-packages/storm-0.19-py2.6-linux-x86_64.egg/storm/database.py", line 322, in raw_execute
    self._check_disconnect(raw_cursor.execute, *args)
  File "/srv/dev/mailman/lib/python2.6/site-packages/storm-0.19-py2.6-linux-x86_64.egg/storm/database.py", line 371, in _check_disconnect
    return function(*args, **kwargs)
OperationalError: database is locked
Dec 18 05:05:38 2012 (31146) SHUNTING: 1355828738.0138969+0a282d3d40cc1528e1d41b992b070b492449a641
Dec 18 11:05:38 2012 (31144) Uncaught runner digest exception: database is locked
Dec 18 11:05:38 2012 (31144) Traceback (most recent call last):
  File "/srv/dev/mailman/mailman3/mailman/src/mailman/core/runner.py", line 138, in _one_iteration
    self._process_one_file(msg, msgdata)
  File "/srv/dev/mailman/mailman3/mailman/src/mailman/core/runner.py", line 222, in _process_one_file
    keepqueued = self._dispose(mlist, msg, msgdata)
  File "/srv/dev/mailman/mailman3/mailman/src/mailman/runners/digest.py", line 373, in _dispose
    for address, delivery_mode in mlist.last_digest_recipients:
  File "/srv/dev/mailman/mailman3/mailman/src/mailman/model/mailinglist.py", line 347, in last_digest_recipients
    results.remove()
  File "/srv/dev/mailman/lib/python2.6/site-packages/storm-0.19-py2.6-linux-x86_64.egg/storm/store.py", line 1183, in remove
    Delete(self._where, self._find_spec.default_cls_info.table))
  File "/srv/dev/mailman/lib/python2.6/site-packages/storm-0.19-py2.6-linux-x86_64.egg/storm/database.py", line 238, in execute
    raw_cursor = self.raw_execute(statement, params)
  File "/srv/dev/mailman/lib/python2.6/site-packages/storm-0.19-py2.6-linux-x86_64.egg/storm/databases/sqlite.py", line 154, in raw_execute
    return Connection.raw_execute(self, statement, params)
  File "/srv/dev/mailman/lib/python2.6/site-packages/storm-0.19-py2.6-linux-x86_64.egg/storm/database.py", line 322, in raw_execute
    self._check_disconnect(raw_cursor.execute, *args)
  File "/srv/dev/mailman/lib/python2.6/site-packages/storm-0.19-py2.6-linux-x86_64.egg/storm/database.py", line 371, in _check_disconnect
    return function(*args, **kwargs)
OperationalError: database is locked
Dec 18 11:05:38 2012 (31144) SHUNTING: 1355828738.035006+8f81ee5185d05d54c65181474667db62072a6756


About 7 messages have been unqueued from the pipeline queue before the locking error happened.

-- 
You received this bug notification because you are a member of Mailman
Coders, which is subscribed to GNU Mailman.
https://bugs.launchpad.net/bugs/1091586

Title:
  Frequent OperationalError: database is locked with sqlite

To manage notifications about this bug go to:
https://bugs.launchpad.net/mailman/+bug/1091586/+subscriptions


More information about the Mailman-coders mailing list