Welcome! Log In Create A New Profile

Advanced

Re: upstream keepalive: call for testing

Maxim Dounin
August 02, 2011 11:28AM
Hello!

On Tue, Aug 02, 2011 at 05:08:11PM +0200, Thomas Love wrote:

> On 29 July 2011 17:36, Maxim Dounin <mdounin@mdounin.ru> wrote:
> >
> >
> > With "keepalive 32;" you keep busy all of your 32 php processes
> > even if there are no active requests, and there are no processes
> > left to process listen queue.
> >
> > On the other hand, nginx will still try to establish new
> > connection if there are no idle one sitting in connections cache
> > during request processing. Therefore some requests will enter
> > php's listen queue and have no chance to leave it. Eventually
> > listen queue will overflow.
> >
> > Please also note that "keepalive 10;" means each nginx worker will
> > keep up to 10 connections. If you are running multiple workers
> > you may need to use lower number.
> >
> >
> Thanks for this. It's been running fine with keepalive 10 on four workers --
> is that because there is connection overlap? Am I risking a possibility of
> exhausting the 32 processes eventually?

With each worker keeping 10 connections 4 workers will be able to
keep 40, which is more than you have processes. I suggest it
works fine just because nginx is underloaded and most requests are
processed by one or two workers.

I would recommend setting something like "keepalive 5;" in your case.

Maxim Dounin

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

upstream keepalive: call for testing

Maxim Dounin 2973 July 26, 2011 07:58AM

Re: upstream keepalive: call for testing

Gena Makhomed 791 July 26, 2011 09:06AM

Re: upstream keepalive: call for testing

Maxim Dounin 806 July 26, 2011 09:10AM

Re: upstream keepalive: call for testing

Thomas Love 821 July 27, 2011 09:44AM

Re: upstream keepalive: call for testing

Maxim Dounin 833 July 27, 2011 10:40AM

Re: upstream keepalive: call for testing

Brian Pane 861 July 28, 2011 12:14AM

Re: upstream keepalive: call for testing

Igor Sysoev 1061 July 28, 2011 02:46AM

Re: upstream keepalive: call for testing

Thomas Love 792 July 29, 2011 09:46AM

Re: upstream keepalive: call for testing

Maxim Dounin 806 July 29, 2011 11:38AM

Re: upstream keepalive: call for testing

splitice 1648 July 29, 2011 11:56AM

Re: upstream keepalive: call for testing

Maxim Dounin 804 July 29, 2011 12:16PM

Re: upstream keepalive: call for testing

splitice 1064 July 29, 2011 12:46PM

Re: upstream keepalive: call for testing

Igor Sysoev 907 July 30, 2011 01:54PM

Re: upstream keepalive: call for testing

Thomas Love 825 August 02, 2011 11:10AM

Re: upstream keepalive: call for testing

Maxim Dounin 1111 August 02, 2011 11:28AM

Re: upstream keepalive: call for testing

Srebrenko Šehić 810 July 30, 2011 01:48PM

Re: upstream keepalive: call for testing

Maxim Dounin 849 July 30, 2011 05:04PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 213
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