Site Access Tips 502 Bad gateway how to solve. According to the analysis is generally the PHP thread open file handle restricted caused.
share in Linux environment site hints 502 Bad Gateway solution
1, raise the file handle of the server open open vi/etc/security/limits.conf bottom plus * Soft nofile 51200* hard nofile 51200vi/etc/sysctl.conf Bottom Add fs.file-m ax=51200
2, the promotion Nginx process file open number Vi/www/wdlinux/nginx/conf/nginx.confworker_rlimit_nofile 5120; Changed into Worker_rlimit_nofile 51200;
3, modify the php-fpm.conf document, the main need to modify 2 places. Vi/www/wdlinux/etc/php-fpm.conf changed to the following value <value name= "max_requests" >10240</value><value name= "Rlimit_" Files ">51200</value>
4, set PHP-FPM automatic start vi/etc/rc.local finally add/etc/init.d/php-fpm start
5, after the completion of Reboot reboot server Ulimit-n view
Source reference resource sharing network: www.5azyw.com/thread-1296-1-1.html