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

sqlite3.OperationalError: database is locked #24

Open
fakebenjay opened this issue Apr 2, 2019 · 1 comment
Open

sqlite3.OperationalError: database is locked #24

fakebenjay opened this issue Apr 2, 2019 · 1 comment

Comments

@fakebenjay
Copy link

Hey all,
Quick question, every time I run trackthenews (it's on a cronjob in an AWS instance that goes off every 10 minutes,) the script doesn't work, and when I try to run it manually, I get a database is locked error. In full:

Running with configuration files in /home/ubuntu/CWRSS/ttnconfig
Traceback (most recent call last):
  File "/home/ubuntu/.pyenv/versions/3.6.5/bin/trackthenews", line 11, in <module>
    sys.exit(main())
  File "/home/ubuntu/.pyenv/versions/3.6.5/lib/python3.6/site-packages/trackthenews/core.py", line 382, in main
    conn.execute('BEGIN EXCLUSIVE')
sqlite3.OperationalError: database is locked

For what it's worth, I'm using an alpha version 0.1.10a2, based off of Matthew McVickar's recent pull request, which prevents the script from crapping out if it encounters a missing title or URL.

Thanks!

@thisisparker
Copy link
Contributor

Hi there,

When I've encountered this in the past it's because there's already an instance running, and it's hanging for some reason. Can you try checking to see if there's a trackthenews in ps aux, killing it, and seeing if things work? And in the meantime, can you pull 0.1.10a3, which may fix the problem in case there's a hang again.

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