Hi All,

      Occassionally users reported that UI was very slow. When we dig 
deeper we found that  some requests never got a response back, rather after 
loadbalancer timed out it returned 504 status code.

Most API calls are high in request size (due to users saving a lot of text 
data back to server). I saw some blogs saying that large request sizes can 
bloat the memory consumed by django process. We were definitely hitting 
peak memory due to this. 

We introduced maximum-request setting to kill process once it reaches this 
limit. It was fine until we hit this weird issue of timeouts for seemingly 
simple API calls.

Digging further, we found that in Apache logs there are 403 status codes, 
it happens right during the time Apache restarts the processes as 
maximum-request setting is reached. We could see some logs of django 
process start logs around the same time.

Question is why do we have 403? In our other production servers this was 
never an issue, only on this one application, Apache keeps the requests 
dangling and later 403 and not sending to the active processes. This is 
requiring us to periodically do apache graceful restarts. This is not 
elegant solution, but any insight into what to improve would be great.

We also have New Relic installed as middleware. We found that a process 
restart takes more than 20 seconds. Is this the root cause? How do we deal 
with improving process restart?



Thanks,
Lalith

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/modwsgi/4cb4025a-7dc6-4993-8dd6-78f7492a0607n%40googlegroups.com.

Reply via email to