Forums

Server response too slow.

I have a simple flask app that queries an MySQL database for small quantity of data. It's being accessed less than 10 times per minute. I see in Server logs that the whole transaction lasts less than 3 seconds, but in access log, response time is frequently higher than 60 seconds. With no modification in the app nor in the clients, response time has been worse in the last 3 days. I also see OSError: write error, some are caused because client waits just 60 seconds, but I'm not sure that all are caused by this. Questions: Where is the wait time for the client? Input queues? I have no visibility of this in logs. What can I do to improve app behavior?

Could you add some more logging to the relevant view to see what is exactly consuming the time of the request?