-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Database is locked #51
Comments
Hm, never seen that before. Will have to take a look later. When you say "uploading TFT", do you mean uploading it to the panel or uploading it to the web interface? |
At step 2.4 NSPanel configuration
Screen was updating, meanwile i was exploring the web interface, and hitting save on a light got me this. |
Okay. Thanks for the report. Will have to look into it. |
It seems like this is an issue with the SQLite database as i though. Per Django documentation (https://docs.djangoproject.com/en/dev/ref/databases/#database-is-locked-errors) the problem is multiple concurrent access attempts to the database which SQLite isn't really built to handle. |
There is room for optimization of database calls, in the "add_light_to_room" function in views.py when adding a light to the room view position, it should be possible to only make 1 database call instead of 12. There is also room for optimization when downloading the TFT. This can be optimized by Downloading multiple chunks at the time instead of just the 1 currently. (this is more information for me, you can ignore it @velijv) |
Got similar logs from the Addon (not doing anything else but managing rooms):
|
What hardware are you running the manager on? |
Haven't heard back on this in a good while and haven't heard anyone else have this problem. Have also had this in the back of my mind when rewriting part of the code so this shouldn't happen any more. Will close. |
Using HomeAssistant Addon.
Whille managing rooms and lights, when TFT was uploading:
The text was updated successfully, but these errors were encountered: