DB Locked error

Bug #369507 reported by Stefano Rivera
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ibid
Invalid
Wishlist
Unassigned

Bug Description

2009-04-29 22:20:09,953 ERROR core.dispatcher: Exception occured in See processor of seen plugin
Traceback (most recent call last):
  File "/home/stefanor/projects/ibid/dc-source/ibid/core.py", line 22, in _process
    processor.process(event)
  File "/home/stefanor/projects/ibid/dc-source/ibid/plugins/seen.py", line 70, in process
    session.flush()
  File "/usr/lib/pymodules/python2.5/sqlalchemy/orm/session.py", line 1351, in flush
    self._flush(objects)
  File "/usr/lib/pymodules/python2.5/sqlalchemy/orm/session.py", line 1422, in _flush
    flush_context.execute()
  File "/usr/lib/pymodules/python2.5/sqlalchemy/orm/unitofwork.py", line 244, in execute
    UOWExecutor().execute(self, tasks)
  File "/usr/lib/pymodules/python2.5/sqlalchemy/orm/unitofwork.py", line 707, in execute
    self.execute_save_steps(trans, task)
  File "/usr/lib/pymodules/python2.5/sqlalchemy/orm/unitofwork.py", line 722, in execute_save_steps
    self.save_objects(trans, task)
  File "/usr/lib/pymodules/python2.5/sqlalchemy/orm/unitofwork.py", line 713, in save_objects
    task.mapper._save_obj(task.polymorphic_tosave_objects, trans)
  File "/usr/lib/pymodules/python2.5/sqlalchemy/orm/mapper.py", line 1336, in _save_obj
    c = connection.execute(statement.values(value_params), params)
  File "/usr/lib/pymodules/python2.5/sqlalchemy/engine/base.py", line 824, in execute
    return Connection.executors[c](self, object, multiparams, params)
  File "/usr/lib/pymodules/python2.5/sqlalchemy/engine/base.py", line 874, in _execute_clauseelement
    return self.__execute_context(context)
  File "/usr/lib/pymodules/python2.5/sqlalchemy/engine/base.py", line 896, in __execute_context
    self._cursor_execute(context.cursor, context.statement, context.parameters[0], context=context)
  File "/usr/lib/pymodules/python2.5/sqlalchemy/engine/base.py", line 950, in _cursor_execute
    self._handle_dbapi_exception(e, statement, parameters, cursor, context)
  File "/usr/lib/pymodules/python2.5/sqlalchemy/engine/base.py", line 931, in _handle_dbapi_exception
    raise exc.DBAPIError.instance(statement, parameters, e, connection_invalidated=is_disconnect)
OperationalError: (OperationalError) database is locked u'UPDATE seen SET time=?, count=? WHERE seen.id = ?' ['2009-04-29 22:20:04.885087', 6,
657]

Revision history for this message
Michael Gorven (mgorven) wrote : Re: [Bug 369507] [NEW] DB Locked error

The SQLite driver doesn't handle concurrent access and simply throws this
exception if the database is locked instead of waiting for it to become
available. I don't think that there's a simple solution to this other
than "use MySQL".

Revision history for this message
Stefano Rivera (stefanor) wrote :

It appears that most drivers, including SQLite support different isolation levels. If we were to set them, this wouldn't occur.

Revision history for this message
Stefano Rivera (stefanor) wrote :

I don't think this is fixable. We could re-run that processor but there are many situations where that would be the wrong thing to do.

Changed in ibid:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.