问题是我上传文件的时候,第一次可以上传成功,第二次就是 502 错误!而且没有任何错误信息,但是我重启 php-fpm 就又可以上传了!
还有我开启了 opcache ,但是我关闭了就可以了,也不需要重启 php-fpm !
错误信息: nginx :没有错误信息
php-fpm :有 WARNING 信息
```
[12-Aug-2016 19:48:04] WARNING: [pool www] child 974 exited on signal 11 (SIGSEGV) after 334.939708 seconds from start
[12-Aug-2016 19:48:04] NOTICE: [pool www] child 1014 started ```
php-fpm ``` [root@iZ9432kvp6sZ log]# netstat -napo |grep "php-fpm" | wc -l 4
```
nginx 配置文件 (没有粘贴出来 server 端的)
worker_processes auto;
worker_rlimit_nofile 100000;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 2048;
multi_accept on;
use epoll;
}
http {
include mime.types;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
client_max_body_size 300M;#设置 post 数据大小
#gzip on;
access_log off;
error_log /var/log/nginx/error.log; #crit;
server_tokens off;
sendfile on;
#tcp_nopush on;
#tcp_nodelay on;
#keepalive_timeout 65;
#client_header_timeout 10;
#client_body_timeout 10;
#reset_timedout_connection on;
#send_timeout 10;
#limit_conn_zone $binary_remote_addr zone=addr:5m;
#limit_conn addr 100;
default_type text/html;
charset UTF-8;
#gzip on;
#gzip_proxied any;
#gzip_min_length 1000;
#gzip_comp_level 4;
#gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
#open_file_cache max=100000 inactive=20s;
#open_file_cache_valid 30s;
#open_file_cache_min_uses 2;
#open_file_cache_errors on;
keepalive_timeout 65;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 128k;
fastcgi_buffers 8 128k;#8 128
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
php 的配置文件就是和默认一样的!
1
a2521298 2016-08-13 02:00:03 +08:00
巧了,我前几天刚遇到,是程序问题,不关 nginx 和 FPM 的事,你可以参考
http://blog.druggo.org/post/2013/05/02/%E4%B8%80%E4%BE%8Bphp%E8%BF%9B%E7%A8%8B%E7%9A%84SIGBUS%E6%95%85%E9%9A%9C |