phpMyAdmin: Connection reset by peer
For a while I installed phpmyadmin package on a fresh Debian 8 server system with nginx and php5-fpm (PHP 5.6). After a few clicks I got a 502 – actually on logging into phpMyAdmin:
[error] 30320#30320: *1 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 1.1.1.1, server: sql.xx.de, request: “GET /server_status.php?db=&token=9e110ef0f9aafe34180240bc10ee55ef&ajax_request=true&ajax_page_request=true&menuHashes=ae5d18df-7615ea15-37d7b73c-d7e88fd8-a78eb140-8f927daa-681a1f60&_nocache=1459007611830930011 HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php5-fpm.sock:”, host: “sql.xx.de”, referrer: “https://sql.xx.de/index.php?token=9e110ef0f9aafe34180240bc10ee55ef”
By catching the worker output of php5-fpm I found the following logs, which meant that php5-fpm was crashing:
WARNING: [pool www] child 30801 exited on signal 11 (SIGSEGV) after 4.318698 seconds from start
I´ve searched for a long time at google, if there´s set any nginx rule wrong, but the problem was opcache. All opcache settings were commented out at php.ini and at my nginx server configuration for phpMyAdmin there were set fastcgi_params (PHP_VALUE “post_max_size=150M\n upload_max_filesize=150M\n max_execution_time=900\n opcache.enable=0\n opcache.enable_cli=0”), which should disable opcache anyhow.
phpMyAdmin worked again, when I activated opcache.enable at php.ini and set the following:
opcache.enable=0 opcache.enable_cli=0
I wondered, why php5-fpm crashed, when opcache is enabled and why wether the fastcgi_params nor the php_flags at the pool.d configuration files at php5-fpm were recognized. But after disabling opcache fully for the whole server, phpMyAdmin worked normally.
Image: Mkkeck Licence: CC-by-sa 3.0 / Short