-
Notifications
You must be signed in to change notification settings - Fork 97
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 #72
Comments
@muatik I will try to replicate and fix it and submit a PR, i need this fix asap |
We've had this issue as well here. |
@teleyinex Can you switch to using sqlalchemy configurations? https://github.com/muatik/flask-profiler#sqlachemy |
That doesn't work either. Interestingly I get an SSL EOF error from psycopg2. Our solution has been to use MongoDB for now. I guess the main issue, is that flask_profile issues too many writes, and sqlite locks itself. Maybe changing the sampling could fix this? |
yes, you can reduce the sampling ratio via configuration too. but it will not be a permanent solution anyway. |
Yep. I don't know, the issue is that we're using them in production, and that's why we cannot debug it unless we write some load testing for the dev server. With sqlite I can imagine the issue is that, while with SQLAlchemy I'm not sure. We'll keep an eye on it in any case ;-) |
Same issue here. How do you recover? |
@aardvark82 you can use another db vendor via SQLAlchemy integration. check out README.md page for more information. |
Same issue here. SQLAlchemy docs seem to say that SQLite3 database locking could be even worse when using SQLAlchemy rather than using the native SQLite3 connector: https://docs.sqlalchemy.org/en/14/dialects/sqlite.html#database-locking-behavior-concurrency. |
From time to time when the package is using sqlite, it locks the db and by then any endpoint is accesible. Here the traceback.
The text was updated successfully, but these errors were encountered: