Nginx wordpress 上传图片错误
出现这个错误:Connection timed out
*1 recv() failed (110: Connection timed out) while reading response header from upstream, client: *, server: chenglin.name, request: "POST /wp-admin/async-upload.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.**.com", referrer: "www.**.com"
/etc/nginx/nginx.conf 追加
http{ fastcgi_connect_timeout 600s; }
这样可能又出现下面的错误:Connection reset by peer
*7 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: *, server: chenglin.name, request: "POST /wp-admin/async-upload.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.chenglin.name", referrer: "http://www.chenglin.name/wp-admin/post-new.php"
/etc/php-fpm.d/www.conf 追加
request_terminate_timeout = 600
超时时间设置长点。