常出现502,504错误
思路:
解决办法:
调整Nginx 和 php-fpm的参数如下
# nginx.conf location段
unix:/usr/local/php/var/run/php-fpm.sock
# fastcgi.conf 修改内容
fastcgi_buffers 32 128k;
fastcgi_buffer_size 128k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
#php-fpm.conf
listen = /usr/local/php/var/run/php-fpm.sock
#提醒:别忘给php-fpm.sock加读写权限
pm = static # 静态绑定5个进程
pm.max_children = 5