Forum: NGINX connection starvation problem

2974d09ac2541e892966b762aad84943?d=identicon&s=25 xinghua_hi (Guest)
on 2014-05-25 18:16
(Received via mailing list)
hi:

      In man epoll , a section refer to "epoll edge trigger  starvation
problem", and around to this we need to maintain a ready list instead of
read socket
until EAGAIN. but i didn't find any related solution code in nginx. In
request body read function `ngx_http_do_read_client_request_body`, it
seems
that
nginx will read socket buffer until EAGAIN or has read Content-length
data.
so if a client is fast enough and post data is large enough, is it
possible
to
starve other connections? SO do i miss something important? nginx how to
deal with this situation in read and write?

thanks!

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,250344,250344#msg-250344
A8108a0961c6087c43cda32c8616dcba?d=identicon&s=25 Maxim Dounin (Guest)
on 2014-05-26 13:44
(Received via mailing list)
Hello!

On Sun, May 25, 2014 at 12:15:51PM -0400, xinghua_hi wrote:

> to
> starve other connections? SO do i miss something important? nginx how to
> deal with this situation in read and write?

This isn't usually a problem unless you are trying to read data
from fast local clients (and to slow enough disks).  In either
case, there is a client_max_body_size directive to limit maximum
possible starvation.

--
Maxim Dounin
http://nginx.org/
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.