Answer the question
In order to leave comments, you need to log in
Why does a python application sometimes freeze?
I'll get to the heart of the matter. There is a python application consisting of a bunch of threads (about 20), there is a thread that monitors whether there are commands from the web interface, the rest of the threads sit in IRC channels, and there is a main thread. The web interface is designed as a small Flask application. That is, remote control is done like this:
Web page <==AJAX==> Flask backend <==socket==> App
All this is running on AWS (EC2), in other words, Linux. And the problem is that if the web interface is not open (it constantly sends requests to the application to display real-time statistics, that is, it "kicks" one thread in the application), then the application simply does not work, it is idle. Logs are not written, nothing. But as soon as I open the web interface, all the bots immediately log into the channels and work as they should. Is this something Linux or an application? And how to fix it?
At what it is not similar that the threads would be killed, they are, as it were, put on pause. But I'm not sure about it
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question