php页面无法完全加载

时间:2014-08-26 06:28:25

标签: nginx php

我的网页无法完全加载。 输入命令并重新加载特殊页面

tail -f /var/log/php-fpm/error.log

然后得到了错误:

[26-Aug-2014 14:12:58] WARNING: [pool www] child 5622 exited on signal 11 (SIGSEGV) after 14.420797 seconds from start
[26-Aug-2014 14:12:58] NOTICE: [pool www] child 5635 started

同时nginx错误日志是:

2014/08/26 14:12:58 [error] 5550#0: *4 readv() failed (104: Connection reset by peer) while reading upstream, client: 106.xxx.xxx.xxx, server: 115.xx.xxx.xxx, request: "GET /xxx/xxx/xxx.html HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "115.xx.xxx.xxx"

任何人都可以帮助我吗?真诚地谢谢你!

1 个答案:

答案 0 :(得分:0)

虽然nginx没有显示任何错误,但我遇到了同样的问题。我通过改变nginx上的缓冲来修复它。请填写以下内容:

fastcgi_max_temp_file_size 0;

fastcgi_buffer_size 4K;
fastcgi_buffers 64 4k;
在你的nginx location块中

你最终会得到类似的东西:

location ~ \.php$ {
    try_files $uri /index.php =404;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_max_temp_file_size 0;
    fastcgi_buffer_size 4K;
    fastcgi_buffers 64 4k;
    include fastcgi_params;
}

有关详情,请查看https://www.namhuy.net/3120/fix-nginx-upstream-response-buffered-temporary-file-error.html