Welcome! Log In Create A New Profile

Advanced

nginx + php-fpm + CentOS 5

Posted by omega13a 
omega13a
nginx + php-fpm + CentOS 5
January 20, 2010 11:08PM
This problem has been bothering me a lot. On one of my website's I'm
hosting a server I set up, some pages never load without timing out
while some only time out sometimes. This is what I see in the error
log for nginx:

2010/01/20 17:34:10 [error] 8832#0: *1 upstream timed out (110:
Connection timed out) while reading response header from upstream,
client: 192.168.1.101, server: urcreative.hobby-site.com, request:
"GET /wiki/index.php?title=Harry_Potter HTTP/1.1", upstream:
"fastcgi://127.0.0.1:9003", host: "urcreative.hobby-site.com"
2010/01/20 17:34:10 [error] 8832#0: *1 open() "/var/www/
urcreative.hobby-site.com/web/wiki/nginx-logo.png" failed (2: No such
file or directory), client: 192.168.1.101, server: urcreative.hobby-
site.com, request: "GET /wiki/nginx-logo.png HTTP/1.1", host:
"urcreative.hobby-site.com", referrer: "http://urcreative.hobby-
site.com/wiki/index.php?title=Harry_Potter"
2010/01/20 17:34:10 [error] 8832#0: *1 open() "/var/www/
urcreative.hobby-site.com/web/wiki/poweredby.png" failed (2: No such
file or directory), client: 192.168.1.101, server: urcreative.hobby-
site.com, request: "GET /wiki/poweredby.png HTTP/1.1", host:
"urcreative.hobby-site.com", referrer: "http://urcreative.hobby-
site.com/wiki/index.php?title=Harry_Potter"

I don't know what is causing the time out. I set keepalive_timeout to
180 in my nginx config file. The only thing I can find in common with
the pages that never or sometime load is they are in a wiki (Mediawiki
1.15.1) I set up. If it helps, here's my PHP set-up:
http://urcreative.hobby-site.com/phpinfo.php . Please note I only
upgrade PHP to 5.3.2RC1 recently (like last week) but this timing out
problem has been around for at least a couple months.
Juan Fco. Giordana
Re: nginx + php-fpm + CentOS 5
January 21, 2010 08:08PM
On 01/21/2010 04:03 AM, omega13a wrote:
> This problem has been bothering me a lot. On one of my website's I'm
> hosting a server I set up, some pages never load without timing out
> while some only time out sometimes. This is what I see in the error
> log for nginx:
>
> [...]
>
> I don't know what is causing the time out. I set keepalive_timeout to
> 180 in my nginx config file. The only thing I can find in common with
> the pages that never or sometime load is they are in a wiki (Mediawiki
> 1.15.1) I set up. If it helps, here's my PHP set-up:
> http://urcreative.hobby-site.com/phpinfo.php . Please note I only
> upgrade PHP to 5.3.2RC1 recently (like last week) but this timing out
> problem has been around for at least a couple months.

Hello,

keepalive_timeout is between nginx and the browser, basically, after the
connection is closed nginx keeps it alive for future requests.

Your problem seems to be that pages are not being generated quickly,
maybe you should tweak your database or you have long backup process.

Play with these directives:

http://wiki.nginx.org/NginxHttpCoreModule#send_timeout

http://wiki.nginx.org/NginxHttpFcgiModule#fastcgi_read_timeout

Also, take a look to the following configuration changes for PHP 5.3:

--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--enable-pdo \
--with-pdo-mysql=mysqlnd \
Sorry, only registered users may post in this forum.

Click here to login

Online Users

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