• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Nginx, 504 Gateway Time-out

Thank you.

I think im going to create a file in /etc/nginx/conf.d/

and add,

proxy_read_timeout 600;

Restart nginx and see if its works for all the domains.

Thank you SergeyUgdyzhekov

Note to other readers of this thread. Please consider this SOLVED if i don't reply back in here :)
 
Last edited:
Hi guys, nothing on here is working for me,. I have tried everything.

this is what my file looks like

#user nginx;
worker_processes 1;

#error_log /var/log/nginx/error.log;
#error_log /var/log/nginx/error.log notice;
#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 65;
#tcp_nodelay on;

#gzip on;
#gzip_disable "MSIE [1-6]\.(?!.*SV1)";

server_tokens off;

include /etc/nginx/conf.d/*.conf;
}

Where should everything go on that file? becuase im really baffled with this, sites been down since yesterdxay, and my support only told my about this today
 
Last edited:
Are you trying to increase 504 Gateway timeout time? Create a new file
/etc/nginx/conf.d/ with extention .conf and add that line..srry on mobile.. hard to copy paste

proxy_read_timeout 600;

and restart nginx
 
Last edited:
ok so i named it timeout.conf, put this line in that file proxy_read_timeout 600; then i uploade the file to /etc/nginx/conf.d/, then i restart ngnix.....

and nothing still nothing
 
Hi this is to increase the time of the timeout.. could you please explain your problem you are having? what is your plesk version?
 
Stop ngnix(i think you can easily do it via the plesk panel) and see if the site works.. this is 502 Bad Gateway not 504 timeout
 
You could setup php max_execution_time setting in Plesk (subscription level). Plesk automagically set the same value for nginx and fastcgi corresponding timeouts so you don't need additional actions with configuration files.

I have set this in Webspace&Domain -> PHP Settings -> max_execution_time set value: 9999

After 45s I get
504 Gateway Time-out
nginx

I set in /etc/httpd/conf.d/fcgid.conf
FcgidIOTimeout 3600

What can I do to run my script longer than 45s?


Plesk 11.5.30#26
 
Back
Top