Using mod_wsgi under Apache, in daemon mode, on Ubuntu, to serve rest api calls from python.
Generally calls take about 0.5 seconds but occasionally they peak at 5 seconds. We are running approximately 40 daemon processes all restricted to a single thread. The server has lots of memory.
These 5 second peaks appear to occur even when the rest call is trivial, little more than "hello world" with a sleep.
My suspicion is that wsgi processes are being swapped by python or the os out but I have little evidence to support this. I also attempted to use nginx/uwsgi with the never-swap parameter and this did not resolve the problem.