![池 www 子项在信号 6 上退出,WordPress http 错误](https://linux22.com/image/708971/%E6%B1%A0%20www%20%E5%AD%90%E9%A1%B9%E5%9C%A8%E4%BF%A1%E5%8F%B7%206%20%E4%B8%8A%E9%80%80%E5%87%BA%EF%BC%8CWordPress%20http%20%E9%94%99%E8%AF%AF.png)
我有Debian Stretch跑步nginx+php7为一个WordPress的网站。
这个问题不是关于WordPress的,但关于php7.0-fpm(只是 wordpress 显示我当前的 php 问题)。请不要告诉我“谷歌一下”,我花了半天时间,尝试了所有可能的解决方案。但都不起作用。
在 Wordpress 帖子中,当我上传文件时出现 HTTP 错误(请注意,这不会发生在插件更新和类似操作上)。
我尝试了以下文件类型,但出现错误:
jpg png pdf mp3
以下是我尝试过的文件类型不得到一个错误:
txt doc docx
这是php7.0-fpm.log当我重新启动 php7.0-fpm 并尝试上传三个不同的文件时:
[11-Aug-2017 14:44:32] NOTICE: fpm is running, pid 661
[11-Aug-2017 14:44:32] NOTICE: ready to handle connections
[11-Aug-2017 14:44:32] NOTICE: systemd monitor interval set to 10000ms
[11-Aug-2017 14:50:35] WARNING: [pool www] child 749 exited on signal 6 (SIGABRT) after 363.688500 seconds from start
[11-Aug-2017 14:50:35] NOTICE: [pool www] child 1234 started
[11-Aug-2017 15:03:06] WARNING: [pool www] child 1546 exited on signal 6 (SIGABRT) after 183.839880 seconds from start
[11-Aug-2017 15:03:06] NOTICE: [pool www] child 1573 started
[11-Aug-2017 15:03:16] WARNING: [pool www] child 1573 exited on signal 6 (SIGABRT) after 9.961325 seconds from start
[11-Aug-2017 15:03:16] NOTICE: [pool www] child 1574 started
这是 nginx'错误日志:
2017/08/11 14:50:35 [error] 776#776: *76 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 123.123.123.123, server: www.website.com, request: "POST /wp-admin/async-upload.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "www.website.com", referrer: "https://www.website.com/wp-admin/post.php?post=1055&action=edit"
2017/08/11 15:03:06 [error] 778#778: *284 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 123.123.123.123, server: www.website.com, request: "POST /wp-admin/async-upload.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "www.website.com", referrer: "https://www.website.com/wp-admin/post.php?post=1055&action=edit"
2017/08/11 15:03:16 [error] 778#778: *295 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 123.123.123.123, server: www.website.com, request: "POST /wp-admin/async-upload.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "www.website.com", referrer: "https://www.website.com/wp-admin/post.php?post=1055&action=edit"
这是我的有趣部分(我认为)nginx 网站拦截:
location ~ \.php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_read_timeout 150;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
这是我的有趣部分(我认为)php7.0 www.conf:
pm = dynamic
pm.max_children = 10
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
问题是:
- 孩子为什么会离开?
- 如果这是由于配置错误,我该如何解决这个问题?
如果您需要有关我的设置的更多信息,请随时询问。
谢谢 !