Adjusting nginx 502 error

  

Recently, a server often has 502 errors, and it has been optimized today.

502 is the backend cgi or proxy server execution timeout, nginx throws out the information, now it is a jump, although the jump, but still not good.

1.request_terminate_timeout Execute php timeout parameter

2.max_children reasonable setting

3.max_requests reasonable setting

4. Binding nginx work CPU, vacate CPU0, CPU0 to do network card interruption and other matters.

5. Optimize the backend mysql

6. Optimize the proxy timeout section

7.fastcgi_connect_timeout, fastcgi_send_timeout, fastcgi_read_timeout

8. Upgrade the Linux kernel to 2.6 .36-rc8

Repair ip_conntrack: table full, dropping packet. The problem is not caused by ip_conntrack_max on the network.

Copyright © Windows knowledge All Rights Reserved