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条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 ads仿真结果在圆图上是怎么读数的
    • ¥20 Cotex M3的调试和程序执行方式是什么样的?
    • ¥20 java项目连接sqlserver时报ssl相关错误
    • ¥15 一道python难题3
    • ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
    • ¥15 牛顿斯科特系数表表示
    • ¥15 arduino 步进电机
    • ¥20 程序进入HardFault_Handler
    • ¥15 oracle集群安装出bug
    • ¥15 关于#python#的问题:自动化测试