Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to persist event in DB #66

Open
nothingshocking opened this issue Feb 28, 2022 · 4 comments
Open

Failed to persist event in DB #66

nothingshocking opened this issue Feb 28, 2022 · 4 comments

Comments

@nothingshocking
Copy link

Hi - I've been running chia-monitor on my RPi4 farmer (Ubuntu 21.04) for a few months now. I've noticed this issue/error recently. When it has happened in the past I have run the 'pipenv run alembic upgrade head' and restarted just fine but within a few days or even within the day the error occurs again. I've also removed the DB and started fresh but this has re-occurred. Are there any insights into the error that you can share or further steps in research you suggest?

`2022-02-27T22:50:15.922 ERROR Failed to persist event to DB. Please initialize DB using: 'pipenv run alembic upgrade head'
Traceback (most recent call last):
File "/home//.local/share/virtualenvs/chia-monitor-jOrTMuHc/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 998, in _commit_impl
self.engine.dialect.do_commit(self.connection)
File "/home/
/.local/share/virtualenvs/chia-monitor-jOrTMuHc/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 672, in do_commit
dbapi_connection.commit()
sqlite3.OperationalError: database is locked

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home//chia-monitor/monitor/main.py", line 81, in aggregator
persist_event(event)
File "/home/
/chia-monitor/monitor/main.py", line 40, in persist_event
db_session.commit()
File "/home//.local/share/virtualenvs/chia-monitor-jOrTMuHc/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1428, in commit
self._transaction.commit(_to_root=self.future)
File "/home/
/.local/share/virtualenvs/chia-monitor-jOrTMuHc/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 836, in commit
trans.commit()
File "/home//.local/share/virtualenvs/chia-monitor-jOrTMuHc/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 2361, in commit
self._do_commit()
File "/home/
/.local/share/virtualenvs/chia-monitor-jOrTMuHc/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 2544, in _do_commit
self._connection_commit_impl()
File "/home//.local/share/virtualenvs/chia-monitor-jOrTMuHc/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 2515, in _connection_commit_impl
self.connection._commit_impl()
File "/home/
/.local/share/virtualenvs/chia-monitor-jOrTMuHc/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1000, in _commit_impl
self.handle_dbapi_exception(e, None, None, None, None)
File "/home//.local/share/virtualenvs/chia-monitor-jOrTMuHc/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 2026, in handle_dbapi_exception
util.raise
(
File "/home/
/.local/share/virtualenvs/chia-monitor-jOrTMuHc/lib/python3.9/site-packages/sqlalchemy/util/compat.py", line 207, in raise

raise exception
File "/home//.local/share/virtualenvs/chia-monitor-jOrTMuHc/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 998, in _commit_impl
self.engine.dialect.do_commit(self.connection)
File "/home/
/.local/share/virtualenvs/chia-monitor-jOrTMuHc/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 672, in do_commit
dbapi_connection.commit()
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked
(Background on this error at: https://sqlalche.me/e/14/e3q8)
2022-02-27T22:50:15.994 INFO  Shutting down!
`

@nothingshocking
Copy link
Author

The same error happened overnight. Not sure what is going on but it is recurring quite a bit.

@nothingshocking
Copy link
Author

Issue occurred again, anyone else experience this or similar problem?

@nothingshocking
Copy link
Author

The issue has persisted and happens so often I have stopped using chia-monitor. I really liked the tool.

@baerrs
Copy link

baerrs commented Nov 23, 2022

I'm having the same issue on a headless system.. no chia-monitor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants