Welcome! Log In Create A New Profile

Advanced

Re: nginx have directives like httpd's MaxRequestsPerChild

Valentin V. Bartenev
October 11, 2014 06:16AM
On Saturday 11 October 2014 11:57:47 MerKer Xu wrote:
> hi there, does nginx have directives like apache's MaxRequestsPerChild?
>
> Description: Limit on the number of requests that an individual child server will handle during its life
> Syntax: MaxRequestsPerChild number
>
> I only found nginx's worker_connections directive, they are quite different!
>
> Is there a similar one? or why nginx doesn't need it?
>
> Many thanks!
>

There are at least three arguments that I think make it a low priority:

1. Memory or socket leaks in nginx are something rare and usually considered as a
serious bug (note also, that Apache has mod_php and friends, which often suffer
from leaks);

2. Each worker process in Apache handles only one connection at a time, while nginx
workers are able (and usually do) to handle millions of long lived connections
simultaneously. So restarting an nginx worker without requests loss isn't a
trivial task and can consume significant time;

See: http://www.aosabook.org/en/nginx.html

3. Such functionality (if needed) can be easily implemented even with much more power
using cron and/or some scripts, since nginx supports reloading and upgrading without
interruption of the client servicing.

And because nginx usually has only a few workers, reloading all of them at the same
time isn't painful.

See: http://nginx.org/en/docs/control.html

wbr, Valentin V. Bartenev

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx have directives like httpd's MaxRequestsPerChild

MerKer Xu October 11, 2014 12:00AM

Re: nginx have directives like httpd's MaxRequestsPerChild

Valentin V. Bartenev October 11, 2014 06:16AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 156
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready