Flask / Waitress server randomly going to 100% CPU usage after time
100% usage is for 1 core of CPU as you are using Flask and waitress ( GIL issue) -- Single processing multi threading , and your process seems to be primarily non CPU based like high IO , as a result  you do not see the python process using the CPU but the queue is increasing and after substantial queue , while allocating the CPU , it starts doing a context switching of all the queued threads and reaches a deadlock race condition . I had a similar problem where I moved out to Gunicorn kind of wsgi server which is capable of running it on multiprocessor with the workers and worker classes
I have a little flask webserver with just one route. The connection is kept open and streams data to the client for as long as the client doesn't stop the connection. 
I'm using waitress multiple threads, so it doesn't block.
Now the problem. After some time, the CPU usage goes up to 100%. In the meantime in got some weird requests to /admin.php, but they are all getting a 404. On idle or with a few connections I don't even see python3 under $ top. 
Why is that and what can I do?