Welcome! Log In Create A New Profile

Advanced

Re: Lots of CLOSE_WAIT sockets, nginx+php (WordPress site)

Vicente Aguilar
February 22, 2010 06:24AM
Hi

>> fastcgi_ignore_client_abort on;
>> fastcgi_connect_timeout 60;
>> fastcgi_send_timeout 180;
>> fastcgi_read_timeout 180;
> You are ignoring client aborts, and has relatively large timeouts
> set for fastcgi. Are you sure the connections in question aren't
> disappear as soon as your fastcgi backend finishes preparing
> response? I.e. check if any particular connection stay for at
> least 5 minutes or so.
>
> Additionally, check if you are able to reproduce the problem with
> fastcgi_ignore_client_abort off.

That was my current config which I copied from a site discussing php-fpm. My initial fastcgi config was:

location ~ .php$ {
# By all means use a different server for the fcgi processes if you need
# to
# fastcgi_pass unix:/tmp/php-fastcgi.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/$host/$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
fastcgi_intercept_errors on;
}

And also had the problem.

> Not responding just because of 100 connections seems strange for
> nginx even with worker_connections 1024, so I suspect you just run
> out of php processes and CLOSE_WAIT's are because of
> fastcgi_ignore_client_abort.

That's what I think too, but there are no stuck PHP connections in netstat. Whenever a PHP page is loaded I got some nginx-PHP sockets but they all close OK, none gets stuck. Only on the client-nginx end is where I can see this behavior with netstat.

Strange.

--
Vicente Aguilar <bisente@bisente.com> | http://www.bisente.com_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Lots of CLOSE_WAIT sockets, nginx+php (WordPress site)

Vicente Aguilar February 21, 2010 05:28AM

Re: Lots of CLOSE_WAIT sockets, nginx+php (WordPress site)

Maxim Dounin February 21, 2010 03:00PM

Re: Lots of CLOSE_WAIT sockets, nginx+php (WordPress site)

Vicente Aguilar February 22, 2010 01:52AM

Re: Lots of CLOSE_WAIT sockets, nginx+php (WordPress site)

Maxim Dounin February 22, 2010 06:00AM

Re: Lots of CLOSE_WAIT sockets, nginx+php (WordPress site)

Vicente Aguilar February 22, 2010 06:24AM

Re: Lots of CLOSE_WAIT sockets, nginx+php (WordPress site)

Maxim Dounin February 22, 2010 07:00AM

Re: Lots of CLOSE_WAIT sockets, nginx+php (WordPress site)

Vicente Aguilar February 22, 2010 02:32PM

Re: Lots of CLOSE_WAIT sockets, nginx+php (WordPress site)

Maxim Dounin February 22, 2010 05:04PM

Re: Lots of CLOSE_WAIT sockets, nginx+php (WordPress site)

Vicente Aguilar February 25, 2010 04:18AM

Re: Lots of CLOSE_WAIT sockets, nginx+php (WordPress site)

Maxim Dounin February 25, 2010 08:04AM

Re: Lots of CLOSE_WAIT sockets, nginx+php (WordPress site)

Vicente Aguilar February 25, 2010 09:02AM

Re: Lots of CLOSE_WAIT sockets, nginx+php (WordPress site)

Vicente Aguilar February 26, 2010 02:32AM

Re: Lots of CLOSE_WAIT sockets, nginx+php (WordPress site)

Vicente Aguilar February 26, 2010 03:28AM

Re: Lots of CLOSE_WAIT sockets, nginx+php (WordPress site)

Vicente Aguilar February 26, 2010 02:40PM

Re: Lots of CLOSE_WAIT sockets, nginx+php (WordPress site)

Vicente Aguilar March 03, 2010 08:36AM

Re: Lots of CLOSE_WAIT sockets, nginx+php (WordPress site)

Benjamin Pineau February 25, 2010 09:54AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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