doushou9028 2016-10-25 07:19
浏览 62

Apache2 + PHP5-FPM:保存操作错误500

I have an error which i can't resolve (obviously otherwise i'd not be here)

Some information about environment :

  • OS : Debian 8.0 (jessie)
  • Apache : 2.4.10 (in mpm_event mode)
  • PHP : 5.6.26 (fpm-fcgi)
  • MySQL : 5.5.52
  • SQLite3 : 3.8.7.1

Apache configuration (mod-fastcgi) :

<IfModule mod_fastcgi.c>
    AddHandler php5.fcgi .php
    Action php5.fcgi /php5.fcgi
    Alias /php5.fcgi /usr/lib/cgi-bin/php5.fcgi
    FastCgiExternalServer /usr/lib/cgi-bin/php5.fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization -idle-timeout 3600
    <Directory /usr/lib/cgi-bin>
       Require all granted
    </Directory>
</IfModule>

php-fpm config :

listen = /var/run/php5-fpm.sock
user = www-data
group = www-data
pm = dynamic
pm.max_children = 10
pm.start_servers = 2
pm.min_spare_servers = 2
pm.max_spare_servers = 5

php modules :

[PHP Modules]
bcmath
bz2
calendar
cgi-fcgi
Core
ctype
curl
date
dba
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
json
libxml
mbstring
mcrypt
memcached
mhash
mysql
mysqli
openssl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
sqlite3
ssh2
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xdebug
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Xdebug
Zend OPcache

I tried to :

  • increase max_children, min_spare_servers, max_spare_servers, max_request.
  • change the idle_timeout (higher or slower)
  • increase the php memory_limit
  • define the request_terminate_timeout to 30s

Nothing to do...

The error occurs only when I try to save my data.

I don't know what I can do for resolving this issue...

In apache error log I have this error :

[Fri Oct 21 08:43:18.998830 2016] [fastcgi:error] [pid 5332:tid 140321069459200] (104)Connection reset by peer: [client 192.168.33.1:57469] FastCGI: comm with server "/usr/lib/cgi-bin/php5.fcgi" aborted: read failed, referer: http://project.local/myaccount/index
[Fri Oct 21 08:43:18.998886 2016] [fastcgi:error] [pid 5332:tid 140321069459200] [client 192.168.33.1:57469] FastCGI: incomplete headers (0 bytes) received from server "/usr/lib/cgi-bin/php5.fcgi", referer: http://project.local/myaccount/index

In php-fpm log I have this :

[21-Oct-2016 08:43:18] WARNING: [pool www] child 29874 exited with code 1 after 9352.926672 seconds from start
[21-Oct-2016 08:43:18] NOTICE: [pool www] child 5815 started

In my vagrant, opcache is disable (when I enable it, error seems to disappear), but in integration and production server I have the same error but opcache is enable.

I have the same error in my vagrant (in development environment), in integration server and production server.

I don't find any solutions...

Help plz :)

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 测距传感器数据手册i2c
    • ¥15 RPA正常跑,cmd输入cookies跑不出来
    • ¥15 求帮我调试一下freefem代码
    • ¥15 matlab代码解决,怎么运行
    • ¥15 R语言Rstudio突然无法启动
    • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
    • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
    • ¥15 用windows做服务的同志有吗
    • ¥60 求一个简单的网页(标签-安全|关键词-上传)
    • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法