Note that there are some explanatory texts on larger screens.

plurals
  1. PO504 Gateway Time-out media temple
    text
    copied!<p>I am constantly getting 504 gateway errors when my php script needs to run for longer than 60 secs.</p> <p>I am on media temple on a dedicated server. I have contacted media temple and they have been helpful but none of their suggesion seem to work for me i was told to edit this file.</p> <p>/etc/httpd/conf.d/fcgid.conf</p> <p>which i have to below</p> <pre><code>LoadModule fcgid_module modules/mod_fcgid.so &lt;IfModule mod_fcgid.c&gt; &lt;IfModule !mod_fastcgi.c&gt; AddHandler fcgid-script fcg fcgi fpl &lt;/IfModule&gt; FcgidIPCDir /var/run/mod_fcgid/sock FcgidProcessTableFile /var/run/mod_fcgid/fcgid_shm FcgidIdleTimeout 300 FcgidMaxRequestLen 1073741824 FcgidProcessLifeTime 10000 FcgidMaxProcesses 64 FcgidMaxProcessesPerClass 15 FcgidMinProcessesPerClass 0 FcgidConnectTimeout 600 FcgidIOTimeout 600 FcgidInitialEnv RAILS_ENV production FcgidIdleScanInterval 600 &lt;/IfModule&gt; </code></pre> <p>so i have tried to max everything as much as i can, to test this i am just running the function below.</p> <pre><code>function test504(){ @set_time_limit(0); sleep(60); echo "true"; } </code></pre> <p>Sleep will work on any value below 60 seconds returning true but on 60 i get 504 gateway error.</p> <p>my phpinfo(); outputs</p> <pre><code>max_execution_time 600 max_input_time 180 </code></pre> <p>I have seen a few post on increasing this fastcgi_connect_timeout but have no idea where to find this on media temple.</p> <p>Can anyone help thanks</p> <p>UPDATE STILL CANT FIX THIS</p> <p>after chatting with support i have been told i need to edit nginx.conf ? and was directed to this post <a href="http://blog.secaserver.com/2011/10/nginx-gateway-time-out/">http://blog.secaserver.com/2011/10/nginx-gateway-time-out/</a></p> <p>cant fine any of the values on my hosting. client_header_timeout client_body_timeout send_timeout fastcgi_read_timeout</p> <p>my nginx.conf file looks like this</p> <pre><code>#error_log /var/log/nginx/error.log info; #pid /var/run/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' # '$status $body_bytes_sent "$http_referer" ' # '"$http_user_agent" "$http_x_forwarded_for"'; #access_log /var/log/nginx/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 120; #tcp_nodelay on; #gzip on; #gzip_disable "MSIE [1-6]\.(?!.*SV1)"; server_tokens off; include /etc/nginx/conf.d/*.conf; } </code></pre> <p>This is driving me crazy any suggestions ???</p> <p>UPDATE i managed to get this sorted in the end after lots of headache added a blog post on how i fixed this here. <a href="http://devsforrest.com/116/boost-settings-on-media-temple-for-maximum-settings">http://devsforrest.com/116/boost-settings-on-media-temple-for-maximum-settings</a></p> <p>Hope this helps someone</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload