First of all, I believe that this project is amazing and thanks for doing it. It's great, I've been using it a lot in my own pet projects. However, I'm having troubles using it in one of my so to say "production" setups.
It's a web server running on raspberry pi with a sqlite database for it's models (flask, sql-alchemy, apache). At some point I've noticed that my sqlite db gets locked, and it loocked like it was accessed way too often and trying to be both read/write for far too many things. So I plugged in tinydb to store some settings of the variables and that helped to offload the sqlite db and everyting was nice and peachy until recently I started to run into "json corrupted" problems.
It looks like the last symbol is not getting written to the db, that is if I open it and just replace whatever the last symbol is with "}" it will work.
I have no idea how to even approach this problem to debug it. Would like to hear any ideas.
My app does use threads (mostly for checking if some setting is getting changed and then exiting the thread loop or something along those lines), and I use tinydb transaction plugin.