shinken-monitoring / mod-livestatus

Shinken module for presenting data with a MK/Livestatus comptabile interface

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Database is locked

diogouchoas opened this issue · comments

My livestatus module suddenly began to crash from time to time. The error messages that precede this problema are the following. Already tried unlocking the sqlite database, but the problem seems to keep happening anyway.

[1472150360] ERROR: [broker-master] [livestatus] Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/Shinken-2.4.3-py2.7.egg/shinken/basemodule.py", line 164, in start_module
    self._main()
  File "/usr/local/lib/python2.7/dist-packages/Shinken-2.4.3-py2.7.egg/shinken/basemodule.py", line 296, in _main
    self.main()
  File "/var/lib/shinken/modules/livestatus/module.py", line 242, in main
    self.do_main()
  File "/var/lib/shinken/modules/livestatus/module.py", line 281, in do_main
    self.main_thread_run()
  File "/var/lib/shinken/modules/livestatus/module.py", line 406, in main_thread_run
    self.db.commit_and_rotate_log_db()
  File "/var/lib/shinken/modules/logstore-sqlite/module.py", line 230, in commit_and_rotate_log_db
    self.commit()
  File "/var/lib/shinken/modules/logstore-sqlite/module.py", line 472, in commit
    self.dbconn.commit()
OperationalError: database is locked

Try with this PR:

shinken-monitoring/mod-logstore-sqlite#15

setting the journal_mode of sqlite to wal