# Error 504, gateway timeout nginx,

**URL:** <https://www.ruby-forum.com/t/error-504-gateway-timeout-nginx/245546>\
**Category:** NGINX\
**Created:** [June 10, 2013, 11:38am UTC](https://www.ruby-forum.com/t/error-504-gateway-timeout-nginx/245546 "2013-06-10T11:38:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafa\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/958977/32.png) [@Rafa\_F](https://www.ruby-forum.com/u/Rafa_F)\
**Post date:** [June 10, 2013, 11:38am UTC](https://www.ruby-forum.com/t/error-504-gateway-timeout-nginx/245546/1 "2013-06-10T11:38:47Z")

</div>

Hello!

I’ve setup a web server running on debian with Nginx, PHP5 (PHP-FPM),  
And  
Fcgiwrap

My webpage is running ok but a friend recently noticed me that while  
trying  
to access my page it gives him the Error 504(others can see my page with  
no  
problem), gateway timeout. I’ve searched for a solution and I’ve done  
this  
so far (still gives him the same error):

in /etc/nginx/sites-enabled/900-ponnod.com.vhost

location @php {  
try\_files $uri =404;  
include /etc/nginx/fastcgi\_params;  
fastcgi\_pass 127.0.0.1:9012;  
fastcgi\_index index.php;  
fastcgi\_param SCRIPT\_FILENAME  
$document\_root$fastcgi\_script\_name;  
#fastcgi\_param PATH\_INFO $fastcgi\_script\_name;  
fastcgi\_intercept\_errors on;  
fastcgi\_read\_timeout 300s;  
fastcgi\_send\_timeout 300s;  
}

in /etc/php5/fpm/php.ini

max\_execution\_time = 300  
max\_input\_time = 300

Can’t find anything useful in my /var/log/nginx/acess or log or in  
php5-fpm.log i also turned the debug in the php-fpm.conf and this is  
what  
it puts out:  
[10-jun-2013 11:35:33.974656] DEBUG: pid 29522,  
fpm\_pctl\_perform\_idle\_server\_maintenance(), line 379: [pool web3]  
currently  
0 active children, 2 spare children, 2 $  
[10-jun-2013 11:35:33.974765] DEBUG: pid 29522,  
fpm\_pctl\_perform\_idle\_server\_maintenance(), line 379: [pool apps]  
currently  
0 active children, 2 spare children, 2 $  
[10-jun-2013 11:35:33.974786] DEBUG: pid 29522,  
fpm\_pctl\_perform\_idle\_server\_maintenance(), line 379: [pool ispconfig]  
currently 0 active children, 3 spare childre$  
[10-jun-2013 11:35:33.974802] DEBUG: pid 29522,  
fpm\_pctl\_perform\_idle\_server\_maintenance(), line 379: [pool www]  
currently 0  
active children, 2 spare children, 2 r$  
[10-jun-2013 11:35:34.975851] DEBUG: pid 29522,  
fpm\_pctl\_perform\_idle\_server\_maintenance(), line 379: [pool web3]  
currently  
0 active children, 2 spare children, 2 $  
[10-jun-2013 11:35:34.975963] DEBUG: pid 29522,  
fpm\_pctl\_perform\_idle\_server\_maintenance(), line 379: [pool apps]  
currently  
0 active children, 2 spare children, 2 $  
[10-jun-2013 11:35:34.975984] DEBUG: pid 29522,  
fpm\_pctl\_perform\_idle\_server\_maintenance(), line 379: [pool ispconfig]  
currently 0 active children, 3 spare childre$  
[10-jun-2013 11:35:34.975998] DEBUG: pid 29522,  
fpm\_pctl\_perform\_idle\_server\_maintenance(), line 379: [pool www]  
currently 0  
active children, 2 spare children, 2 r$  
[10-jun-2013 11:35:35.977049] DEBUG: pid 29522,  
fpm\_pctl\_perform\_idle\_server\_maintenance(), line 379: [pool web3]  
currently  
0 active children, 2 spare children, 2 $  
[10-jun-2013 11:35:35.977162] DEBUG: pid 29522,  
fpm\_pctl\_perform\_idle\_server\_maintenance(), line 379: [pool apps]  
currently  
0 active children, 2 spare children, 2 $  
[10-jun-2013 11:35:35.977183] DEBUG: pid 29522,  
fpm\_pctl\_perform\_idle\_server\_maintenance(), line 379: [pool ispconfig]  
currently 0 active children, 3 spare childre$  
[10-jun-2013 11:35:35.977227] DEBUG: pid 29522,  
fpm\_pctl\_perform\_idle\_server\_maintenance(), line 379: [pool www]  
currently 0  
active children, 2 spare children, 2 r$

Nothing useful as far as i can see.

Any help or direction would be appriciated, thanks!

Matej

Posted at Nginx Forum:

> **[error 504, gateway timeout nginx,](https://forum.nginx.org/read.php?2,239986,239986#msg-239986)**
>
> Hello! I've setup a web server running on debian with Nginx, PHP5 (PHP-FPM), And Fcgiwrap My webpage is running ok but a friend recently noticed me that while trying to access my page it gives him the Error 504(others can see my page with no...

---

<div class="post-metadata">

**Author:** ![molj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/7ea924/32.png) [@molj](https://www.ruby-forum.com/u/molj)\
**Post date:** [June 10, 2013, 11:49am UTC](https://www.ruby-forum.com/t/error-504-gateway-timeout-nginx/245546/2 "2013-06-10T11:49:19Z")

</div>

Hy!

in /etc/php5/fpm/pool.d/www.conf:

check this:

request\_slowlog\_timeout = 0s  
request\_terminate\_timeout = 0

Hope help you

2013/6/10 molj [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
