I have created a Python Flask application that uses quite a lot of memory, - several hundreds of MB. I have a problem with the application as it sometimes do not repond.
I see "502 Bad Gateway" in the response and various respawnings in the uwsgi.log, e.g.,
[pid: 29|app: 0|req: 15/62] 192.168.146.0 () {38 vars in 621 bytes} [Fri Jul 7 00:17:34 2017] GET /wembedder/ => generated 1412 bytes in 10 msecs (HTTP/1.1 200) 2 headers in 81 bytes (1 switches on core 0) [pid: 29|app: 0|req: 16/63] 192.168.146.0 () {40 vars in 712 bytes} [Fri Jul 7 00:17:36 2017] GET /wembedder/most-similar/ => generated 2823 bytes in 3 msecs (HTTP/1.1 200) 2 headers in 81 bytes (1 switches on core 0) [pid: 29|app: 0|req: 17/64] 192.168.146.0 () {40 vars in 746 bytes} [Fri Jul 7 00:18:04 2017] GET /wembedder/most-similar/Q315062 => generated 4091 bytes in 4 msecs (HTTP/1.1 200) 2 headers in 81 bytes (1 switches on core 0) DAMN ! worker 1 (pid: 29) died, killed by signal 9 :( trying respawn ... Respawned uWSGI worker 1 (new pid: 30)
I have also noted that unrelated Magnus Manske applications, e.g., sourcemd, have been fairly slow in the last couple of days.
Is there are problem with applications that use so much memory. I was under the impression that the service would be able to handle up to 4 GB. Is it possible for me to see the load off the computer? I tried with top, qstat or kubectl. webservice --backend=kubernetes python start takes several minutes, while on my computer the setup of the application takes a few seconds.