how to fix 504 gateway nginx timeout error cloud fare 522 524 error wordpress in vps server

how to fix 504 gateway nginx timeout error cloud fare 522 524 error in wordpress in vps server.

http://blog.secaserver.com/wp-content/uploads/2011/10/nginx.png

how to fix 504 gateway nginx timeout error?

504 gate way time out  problem description.

This problem is entirely due to slow IP communication between back-end computers, possibly including the Web server. Only the people who set up the network at the site which hosts the Web server can fix this problem.

what is nginx?

Nginx is an open source reverse proxy server for HTTP, HTTPS, SMTP, POP3, and IMAP protocols, as well as a load balancer, HTTP cache, and a web server. The nginx project started with a strong focus on high concurrency, high performance and low memory usag.

how nginx causes 504 timeout?

this error appears mainly nginx installed servers. because ngnix reduces max exceution time for .php script.

how to fix 504 error in nginx servers.

simply we need to increase timeout range unfortunately newbies with out knowledge can’ do this we need to contact hosting support for increasing limit. some times it’s not worked hosting proviers ask permission you to uninstall ngnix. if you do this you are out of 504 gateway error. but you get high cpu load on server.

how to increase the time out limit in ngnix?

/etc/ngnix/ngnix.conf
send_timeout 120;
proxy_read_timeout 120;
proxy_connect_timeout 120;

If they are not there you may add them or create a .conf file in /etc/nginx/conf.d/ folder with those values.
Then restart nginx:
# /etc/init.d/nginx restart 

read more about this ngnix .org official.

for how to fix 520 521 523 524 gate way time out in cloud fare visit cloud fare.
how to fix 504 gateway nginx timeout error cloud fare 522 524 error
these errors not by cloud fare it’s by your web server.

fix nginx 502 bad gateway

open /etc/nginx/nginx.conf
add the following lines into http section :
1
2
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;
you config should look like this :
1
2
3
4
5
6
7
8
http {
.
.
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;
.
.
}

Restart nginx and fastcgi.

resource can help you