# The timeout under heavy load

**URL:** <https://www.ruby-forum.com/t/the-timeout-under-heavy-load/210965>\
**Category:** NGINX\
**Created:** [August 22, 2011, 12:28pm UTC](https://www.ruby-forum.com/t/the-timeout-under-heavy-load/210965 "2011-08-22T12:28:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [August 22, 2011, 12:28pm UTC](https://www.ruby-forum.com/t/the-timeout-under-heavy-load/210965/1 "2011-08-22T12:28:29Z")

</div>

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:

> **[The timeout under heavy load](https://forum.nginx.org/read.php?2,214135,214135#msg-214135)**
>
> 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...
