I am also getting this, but decided to go back to 5.2.10, from Ubuntu
Karmic. Running into other errors now.
On Apr 2, 12:13 pm, Gordon Pettey <petteyg...@gmail.com> wrote:
> I had this issue a while back. The solution was screwing around with
> fastcgi_buffers and fastcgi_buffer_size. I ended up with
> fastcgi_buffers 256 16k;
> fastcgi_buffer_size 32k;
>
> On Fri, Apr 2, 2010 at 8:23 AM, empire29 <nginx-fo...@nginx.us> wrote:
> > I am running Nginx and proxying php requests via FastCGI to PHP-FPM for processing. I will randomly receive 502 Bad Gateway error pages - I can reproduce this issue by clicking around my PHP websites very rapidly/refreshing a page for a minute or two. When I get the 502 error page all I have to do is refresh the browser and the page refreshes properly.
>
> > Here is my setup:
>
> > nginx/0.7.64
> > PHP 5.3.2 (fpm-fcgi) (built: Apr 1 2010 06:42:04)
> > Ubuntu 9.10 (Latest 2.6 Paravirt)
>
> > I compiled PHP-FPM using this ./configure directive
>
> > ./configure --enable-fpm --sysconfdir=/etc/php5/conf.d --with-config-file-path=/etc/php5/conf.d/php.ini --with-zlib --with-openssl --enable-zip --enable-exif --enable-ftp --enable-mbstring --enable-mbregex --enable-soap --enable-sockets --disable-cgi --with-curl --with-curlwrappers --with-gd --with-mcrypt --enable-memcache --with-mhash --with-jpeg-dir=/usr/local/lib --with-mysql=/usr/bin/mysql --with-mysqli=/usr/bin/mysql_config --enable-pdo --with-pdo-mysql=/usr/bin/mysql --with-pdo-sqlite --with-pspell --with-snmp --with-sqlite --with-tidy --with-xmlrpc --with-xsl
>
> > My php-fpm.conf looks like this (the relevant parts):
>
> > ...
>
> > 3
> > ...
> > 60s
> > 30s
> > /var/log/php-fpm.log.slow
> > 1024
> > 0
>
> > yes
> > 500
> > ...
>
> > I've tried increasing the max_children to 10 and it makes no difference.. I've also tried setting it to 'dynamic' and setting max_children to 50, and start_server to '5' without any difference.
>
> > I have tried using both 1 and 5 nginx worker processes.
>
> > My fastcgi_params conf looks like:
>
> > fastcgi_connect_timeout 60;
> > fastcgi_send_timeout 180;
> > fastcgi_read_timeout 180;
> > fastcgi_buffer_size 128k;
> > fastcgi_buffers 4 256k;
> > fastcgi_busy_buffers_size 256k;
> > fastcgi_temp_file_write_size 256k;
> > fastcgi_intercept_errors on;
>
> > fastcgi_param QUERY_STRING $query_string;
> > fastcgi_param REQUEST_METHOD $request_method;
> > fastcgi_param CONTENT_TYPE $content_type;
> > fastcgi_param CONTENT_LENGTH $content_length;
>
> > fastcgi_param SCRIPT_NAME $fastcgi_script_name;
> > fastcgi_param REQUEST_URI $request_uri;
> > fastcgi_param DOCUMENT_URI $document_uri;
> > fastcgi_param DOCUMENT_ROOT $document_root;
> > fastcgi_param SERVER_PROTOCOL $server_protocol;
>
> > fastcgi_param GATEWAY_INTERFACE CGI/1.1;
> > fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
>
> > fastcgi_param REMOTE_ADDR $remote_addr;
> > fastcgi_param REMOTE_PORT $remote_port;
> > fastcgi_param SERVER_ADDR $server_addr;
> > fastcgi_param SERVER_PORT $server_port;
> > fastcgi_param SERVER_NAME $server_name;
> > fastcgi_param REDIRECT_STATUS 200;
>
> > Nginx logs the error as:
>
> > 3947#0: *10530 connect() failed (111: Connection refused) while connecting to upstream, client: 68.40.xxx.xxx, server:www.domain.com, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.domain.com"
>
> > PHP-FPM logs the follow at the time of the error:
>
> > pid 17161, fpm_unix_init_main(), line 255: getrlimit(nofile): max:1024, cur:1024
> > pid 17161, fpm_event_init_main(), line 93: libevent: using epoll
> > pid 17161, fpm_init(), line 50: fpm is running, pid 17161
> > pid 17161, fpm_children_make(), line 403: child 17162 started
> > pid 17161, fpm_children_make(), line 403: child 17163 started
> > pid 17161, fpm_children_make(), line 403: child 17164 started
> > pid 17161, fpm_event_loop(), line 111: ready to handle connections
>
> > My CPU usage maxes out around 10-15% when I recreate the issue. My Free mem (free -m) is > 130MB
>
> > I had this intermittent 502 Bad Gateway issue when in was using php5-cgi to service my php requests as well. Does anyone know how to fix this?
>
> > Posted at Nginx Forum:http://forum.nginx.org/read.php?3,70566,70566#msg-70566
>
>
--
To unsubscribe, reply using "remove me" as the subject.