Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
Intermittent 500 error when inserting into MySQL from Python Flask App
I keep getting a 500 issue when inserting data into MySql DB. I know when the issue occurs but can’t figure out why.
When I insert data (e.g. new user) into my DB, I can see it has been inserted correctly from MySql Workbench but about 50% of the time a 500 error is returned which says that the entry doesn’t exist. When you refresh the page it randomly comes and goes.
After I restart uwsgi (service uwsgi restart) and use the app again, it works as expected until I add some more data then the issue occurs again but only for data inserted after the restart.
The app works as expected when running on my local windows machine.
Would really appreciate any help on this before my head explodes!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×