Closed snekiam closed 4 years ago
Note: This is from an unmerged fork running on google cloud on python v3.8, but the vast, vast majority of the code is the same (I think all the sqlalchemy stuff is critically). I would bet that this is what is happening on heroku also, and that its not just a memory issue that we're running into.
It would appear our timeout is 8 hours (28800 seconds):
So problems will probably start to occur after around 8 hours, but I haven't tested this to know for sure.
You could try making the timeout value very low if you wanted to test this out!
Describe the bug After running for several hours (or several days), the flask server starts returning a 500 for every question it gets asked. (Something like this: The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.)
To Reproduce Steps to reproduce the behavior:
Expected behavior The server continues to handle requests without a server error.
Screenshots Problem manifestation:![image](https://user-images.githubusercontent.com/8095061/81140831-ad271800-8f1f-11ea-8f2c-cd02c49c9f4c.png)
Desktop (where the request was made):
Server (Where the flask server was running):
Additional context I think (this)[https://stackoverflow.com/questions/26891971/mysql-connection-not-available-when-use-sqlalchemymysql-and-flask] is the problem we're running into, but I haven't tried this yet.
Here's the logs from that request: