OperationalError: database is locked

Hi guys

Lately I started to encounter the “OperationalError: database is locked” error more often. Usually when that happens, the apps do no longer start correctly or the detection of objects / fingers stopps working. The error seems to occur randomly. Anyone encountered the same issue?

Could you give me more details as to what actually goes wrong / what I can do to prevent it from happening?

Heres the stack trace:
Exception in thread Thread-3:
Traceback (most recent call last):
File “/usr/lib/python2.7/threading.py”, line 801, in __bootstrap_inner
File “/usr/lib/python2.7/threading.py”, line 754, in run
self.__target(*self.__args, **self.__kwargs)
File “lampix/cefbridge.py”, line 42, in lampix.cefbridge.CefBridge.javascript_request_listener
File “/usr/lib/python2.7/logging/init.py”, line 1200, in exception
self.error(msg, *args, **kwargs)
File “/usr/lib/python2.7/logging/init.py”, line 1193, in error
self._log(ERROR, msg, args, **kwargs)
File “/usr/lib/python2.7/logging/init.py”, line 1286, in _log
File “/usr/lib/python2.7/logging/init.py”, line 1296, in handle
File “/usr/lib/python2.7/logging/init.py”, line 1336, in callHandlers
File “/usr/lib/python2.7/logging/init.py”, line 759, in handle
File “/home/lampix/smartlamp/lampix/lampix_logging/SQLiteHandler.py”, line 50, in emit
self.insert_in_db(record, msg, image)
File “/home/lampix/smartlamp/lampix/lampix_logging/SQLiteHandler.py”, line 61, in insert_in_db
stack_info=stack_info, thread=record.thread, threadname=record.threadName)
File “/home/lampix/.local/lib/python2.7/site-packages/peewee.py”, line 5531, in create
File “/home/lampix/.local/lib/python2.7/site-packages/peewee.py”, line 5675, in save
File “/home/lampix/.local/lib/python2.7/site-packages/peewee.py”, line 1604, in inner
return method(self, database, *args, **kwargs)
File “/home/lampix/.local/lib/python2.7/site-packages/peewee.py”, line 1675, in execute
return self._execute(database)
File “/home/lampix/.local/lib/python2.7/site-packages/peewee.py”, line 2331, in _execute
return super(Insert, self)._execute(database)
File “/home/lampix/.local/lib/python2.7/site-packages/peewee.py”, line 2097, in _execute
cursor = database.execute(self)
File “/home/lampix/.local/lib/python2.7/site-packages/peewee.py”, line 2696, in execute
return self.execute_sql(sql, params, commit=commit)
File “/home/lampix/.local/lib/python2.7/site-packages/peewee.py”, line 2690, in execute_sql
File “/home/lampix/.local/lib/python2.7/site-packages/peewee.py”, line 2481, in exit
reraise(new_type, new_type(*exc_args), traceback)
File “/home/lampix/.local/lib/python2.7/site-packages/peewee.py”, line 2683, in execute_sql
cursor.execute(sql, params or ())
OperationalError: database is locked


The database is used while logging messages from the application. Please make sure that you are avoiding messages in loops.
Also, we found some cleanup issues on Lampix 2.3.3, which have been fixed with Lampix 2.4.0.

Let us know if this issue persists, so we can further investigate.