The timeout under heavy load

speedfirst nginx-forum at nginx.us
Mon Aug 22 10:28:16 UTC 2011


This is not a real problem of nginx. I just want to confirm the solution
under this case.

My nginx serving as a web reverse proxy, and it also connects to a third
server for authentication with the Cookie and token in URI. The
authentication server's timeout is 3s. The authentication is handled by
my own module.

In a stress test, we make a 200MB fake response from the upstream and
start 150 concurrent client. The upstream will send this 200MB response
with a 20KB buffer. That's, the servlet will "write" the response each
time when the 20KB buffer is full.

After a while, my own module starts to report time out. The log show
that the time between the authentication request's sending and read
handler is invoked is > 3s.

I want to confirm is:
1. Due to the nginx event model, the long time taken by several requests
will make other events think they are "time out", right?
2. What's the best way to resolve this problems? Increase the timeout
value?
3. Will enabling nginx multi-threading help in this case?

Many thanks.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,214135,214135#msg-214135



More information about the nginx mailing list