Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > ISPConfig 3 Priority Support

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 3rd October 2013, 05:09
tomek tomek is offline
Junior Member
 
Join Date: Jan 2012
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default 504 Gateway Time-out using Nginx & ISPCONFIG

Hello All

I installed a brand new server Centos 6.4 64bit on a dedicated machine, I followed The Perfect Server - CentOS 6.4 x86_64 (nginx, Dovecot, ISPConfig 3) .

I have a few wordpress sites and a few joomla sites that I moved from an older server running Apache to the new one I just installed. Everything seems to be running fine, sites load etc, but everything soon stops, I am getting 504 Gateway Time-out errors. I have to restart php-fpm service to get it to start working again, but in a few minutes after restarting I am getting the same error.

The only things I did that were not part of the guide was:
For wordpress sites, in ISPCONFIG/Options in the nginx Directives in order for URL rewriting to work, I added

location / {
index index.php index.html index.htm;
try_files $uri $uri/ /index.php?$args;
}

and for Joomla sites in the same place I added:

# Support Clean (aka Search Engine Friendly) URLs</tt>
location / {
try_files $uri $uri/ /index.php?q=$request_uri;
}

I am not sure what is the cause of this problem. Searching on google, I tried several things I found, but nothing seems to help resolve the problem. Can somebody help me get this resolved?

Thanks!
Reply With Quote
Sponsored Links
  #2  
Old 3rd October 2013, 17:59
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,744 Times in 2,577 Posts
Default

Did you check the web site's error log and also the PHP-FPM log?

Also check your PHP-FPM emergency settings (see chapter 3.3 on http://www.howtoforge.com/configurin...um-performance).
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 3rd October 2013, 18:51
tomek tomek is offline
Junior Member
 
Join Date: Jan 2012
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

These are last entries of the error log for one of the wordpress sites

2013/10/02 19:30:53 [error] 2794#0: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.1.14, server: oelsnet.net, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9010", host: "oelsnet.net"
2013/10/02 19:30:57 [error] 2794#0: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.1.14, server: oelsnet.net, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9010", host: "oelsnet.net"
2013/10/02 19:31:08 [error] 2794#0: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.1.14, server: oelsnet.net, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9010", host: "oelsnet.net"
2013/10/02 19:31:09 [error] 2794#0: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.1.14, server: oelsnet.net, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9010", host: "oelsnet.net"
2013/10/02 19:31:09 [error] 2794#0: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.1.14, server: oelsnet.net, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9010", host: "oelsnet.net"
2013/10/02 21:50:44 [error] 2794#0: *140 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 192.168.1.122, server: oelsnet.net, request: "GET /wp-content/plugins/dropdown-menu-widget/css/shailan-dropdown.min.css HTTP/1.1", upstream: "fastcgi://127.0.0.1:9010", host: "oelsnet.net", referrer: "http://oelsnet.net/"
2013/10/02 21:55:43 [error] 2794#0: *139 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 192.168.1.122, server: oelsnet.net, request: "GET /wp-content/plugins/ubm-premium/scripts.php?ver=3.6 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9010", host: "oelsnet.net", referrer: "http://oelsnet.net/"


These are last entries of php-fpm log

[01-Oct-2013 22:30:00] NOTICE: fpm is running, pid 9322
[01-Oct-2013 22:30:00] NOTICE: ready to handle connections
[01-Oct-2013 22:48:46] NOTICE: Reloading in progress ...
[01-Oct-2013 22:48:46] NOTICE: reloading: execvp("php-fpm", {"php-fpm", "--daemonize"})
[01-Oct-2013 22:48:46] NOTICE: using inherited socket fd=8, "127.0.0.1:9000"
[01-Oct-2013 22:48:46] NOTICE: using inherited socket fd=8, "127.0.0.1:9000"
[01-Oct-2013 22:48:46] NOTICE: fpm is running, pid 13769
[01-Oct-2013 22:48:46] NOTICE: ready to handle connections
[01-Oct-2013 22:50:03] WARNING: [pool ispconfig] child 13779 exited on signal 11 (SIGSEGV - core dumped) after 76.770434 seconds from start
[01-Oct-2013 22:50:03] NOTICE: [pool ispconfig] child 14158 started
[01-Oct-2013 22:54:03] NOTICE: Reloading in progress ...
[01-Oct-2013 22:54:03] NOTICE: reloading: execvp("php-fpm", {"php-fpm", "--daemonize"})
[01-Oct-2013 22:54:03] NOTICE: using inherited socket fd=8, "127.0.0.1:9000"
[01-Oct-2013 22:54:03] NOTICE: using inherited socket fd=8, "127.0.0.1:9000"
[01-Oct-2013 22:54:03] NOTICE: using inherited socket fd=10, "/var/lib/php5-fpm/apps.sock"
[01-Oct-2013 22:54:03] NOTICE: using inherited socket fd=10, "/var/lib/php5-fpm/apps.sock"
[01-Oct-2013 22:54:03] NOTICE: using inherited socket fd=12, "/var/lib/php5-fpm/ispconfig.sock"
[01-Oct-2013 22:54:03] NOTICE: using inherited socket fd=12, "/var/lib/php5-fpm/ispconfig.sock"
[01-Oct-2013 22:54:03] NOTICE: fpm is running, pid 14430
[01-Oct-2013 22:54:03] NOTICE: ready to handle connections


I went to the link you suggested about the emergency PHP-FPM settings, I made the adjustments in /etc/php-fpm.conf but this didn't help, I am still having the same problem.

Last edited by tomek; 4th October 2013 at 04:17.
Reply With Quote
  #4  
Old 4th October 2013, 04:38
tomek tomek is offline
Junior Member
 
Join Date: Jan 2012
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

I noticed that when the websites stop responding this error is present in /var/log/php-fpm/error.log

[03-Oct-2013 21:26:18] WARNING: [pool web1] child 27029 exited on signal 11 (SIGSEGV - core dumped) after 555.135693 seconds from start

I turned debug option and the log is as follows

[03-Oct-2013 21:44:04.131474] DEBUG: pid 28203, fpm_scoreboard_proc_alloc(), line 296: [pool web1] the proc->free_slot was not free. Let's search
[03-Oct-2013 21:44:04.132551] DEBUG: pid 28203, fpm_children_make(), line 421: [pool web1] child 28747 started
[03-Oct-2013 21:44:04.132577] DEBUG: pid 28203, fpm_pctl_perform_idle_server_maintenance(), line 428: [pool web1] 1 child(ren) have been created dynamically
[03-Oct-2013 21:44:04.132587] DEBUG: pid 28203, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool web2] currently 0 active children, 2 spare children, 2 running children. Spawning rate 1
[03-Oct-2013 21:44:04.132596] DEBUG: pid 28203, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 0 active children, 5 spare children, 5 running children. Spawning rate 1
[03-Oct-2013 21:44:04.132608] DEBUG: pid 28203, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool web4] currently 0 active children, 2 spare children, 2 running children. Spawning rate 1
[03-Oct-2013 21:44:04.132616] DEBUG: pid 28203, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool ispconfig] currently 0 active children, 2 spare children, 2 running children. Spawning rate 1
[03-Oct-2013 21:44:04.132624] DEBUG: pid 28203, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool web3] currently 0 active children, 2 spare children, 2 running children. Spawning rate 1
[03-Oct-2013 21:44:05.132706] DEBUG: pid 28203, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool apps] currently 0 active children, 2 spare children, 2 running children. Spawning rate 1
[03-Oct-2013 21:44:05.132741] DEBUG: pid 28203, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool web5] currently 0 active children, 2 spare children, 2 running children. Spawning rate 1
[03-Oct-2013 21:44:05.132755] DEBUG: pid 28203, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool web1] currently 5 active children, 1 spare children, 6 running children. Spawning rate 2
[03-Oct-2013 21:44:05.132782] DEBUG: pid 28203, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool web2] currently 0 active children, 2 spare children, 2 running children. Spawning

At this point im stuck....

Last edited by tomek; 4th October 2013 at 04:52.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
around 80 sleeping connections created by ISPConfig bkilinc General 2 1st October 2012 16:12
ubuntu VPS running ISPconfig + nginx 1gb ram 100% iain17 General 1 3rd June 2012 17:31
reinstall postfix after securing-short question fxs Installation/Configuration 12 30th January 2012 10:10
All files gone after changing quota to 0 spynode General 17 19th January 2012 14:41
ispconfig 3.0.3.1 with nginx - updates give "Error while sending INIT_DB packet" talkingnews General 3 20th December 2011 12:28


All times are GMT +2. The time now is 12:31.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.