标签:
最近迁移服务器,在网站搬到新服务器第一天就报504错误,服务器及ip都能ping通,查看错误日志,发现upstream timed out (110: Connection timed out)的错误,上网百度了下,原因应该是nginx配置问题
打开/etc/php5/php-fpm/pool.d/www.conf
将pm.max_children修改为40
request_terminate_time修改为900
再修改php.ini
max_execution_time = 30,把它修改得更长时间
再在/etc/nginx/site-avaiable/虚拟主机名称
文件location ~ \.php$ {
}
中加上
fastcgi_read_timeout 600;
fastcgi_connect_timeout 600;
fastcgi_send_timeout 600;
fastcgi_buffers 2 256k;
fastcgi_buffer_size 128k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
nginx error_log报错upstream timed out (110: Connection timed out)
标签:
原文地址:http://www.cnblogs.com/you-jia/p/4642871.html