Posts

Showing posts with the label Debug

Python application crashes without throwing any exception

PROBLEM: Recently I have written a flask application and encountered a problem that the application randomly dies. My application is to provide a simple REST API to query some personal information. It serves both HTTP and HTTPS. I run the app by python command, just like below python my_app.py (Yeah, I know that command is for development only and should not be used in production) Everything went well for a couple of tests, til the rainy time, literally, there was a heavy rain outside. I sent a HTTPS request using postman and the above command just stopped. I tried several times, the issue did not happen permanently. Sometimes it crashed, sometimes it went well. There was not any information dumping out to screen. The command was just completed with a lame terminal's prompt. HOW I DEAL WITH IT: I was just a novice in python and was expecting for an exception that would tell me the exact reason why my application had been crashed. Well, there was nothing. I goog