[CentOS] Troubleshooting php-fpm with apache on Centos 7

Tue Aug 8 05:52:01 UTC 2017
Nikolaos Milas <nmilas at noa.gr>


I am running httpd-2.4.6-45.el7.centos.x86_64 with 
php-fpm-7.0.22-1.el7.remi.x86_64 (on CentOS 7).

My main problem: On this httpd server I have several vhosts running, but 
apparently I am facing intermittent problems with php-fpm communication 
on only one of them.

Most of the sites are WordPress or Joomla Applications (running with 
mysql). Everything seems right: low load, all websites are operating 
fine, except this one, but only intermittently.

The secondary problem is that I can't seem to be able to log php errors.

When the problem starts, the users receive "503 Service Unavailable" 
pages for many hours/days, and in the error log I see only such errors:

    [Tue Aug 08 08:27:31.742640 2017] [proxy_fcgi:debug] [pid 29259]
    mod_proxy_fcgi.c(963): [client] AH01076: url:
    proxyname: (null) proxyport: 0
    [Tue Aug 08 08:27:31.742642 2017] [proxy_fcgi:debug] [pid 29259]
    mod_proxy_fcgi.c(970): [client] AH01078: serving
    URL fcgi://
    [Tue Aug 08 08:27:31.742645 2017] [proxy:debug] [pid 29259]
    proxy_util.c(2203): AH00942: FCGI: has acquired connection for (*)
    [Tue Aug 08 08:27:31.742661 2017] [proxy:debug] [pid 29259]
    proxy_util.c(2256): [client] AH00944: connecting
    fcgi:// to
    [Tue Aug 08 08:27:31.742690 2017] [proxy:debug] [pid 29259]
    proxy_util.c(2422): [client] AH00947: connected
    /var/webs/wwwgreekgeo/www/wp/index.php to
    [Tue Aug 08 08:27:31.742739 2017] [proxy:debug] [pid 29259]
    proxy_util.c(2798): AH02824: FCGI: connection established with (*)
    [Tue Aug 08 08:27:52.347960 2017] [proxy_fcgi:error] [pid 29259]
    (104)Connection reset by peer: [client] AH01075:
    Error dispatching request to :
    [Tue Aug 08 08:27:52.348021 2017] [proxy:debug] [pid 29259]
    proxy_util.c(2218): AH00943: FCGI: has released connection for (*)

The problem is NOT resolved by restarting apache and/or php-fpm.

The config of the vhost is as follows:

    <VirtualHost *:80>
             DocumentRoot "/var/webs/wwwgreekgeo/www"

             ServerName www.greekgeo.noa.gr

             ServerAdmin webmaster at noa.gr

             DirectoryIndex index.php index.html index.htm

             php_flag log_errors on
             php_flag display_errors off
             php_value error_log /var/webs/wwwgreekgeo/log/php_error_log
    #        php_value error_reporting 32767
    #        php_value error_reporting 2147483647
             php_value error_reporting 6135

             Redirect 301 /en.index.html http://www.greekgeo.noa.gr/wp/

             RewriteEngine on

             RedirectMatch ^/index.html$ /wp/

         <Directory "/var/webs/wwwgreekgeo/www">
             Options -Indexes +FollowSymLinks
             AllowOverride All
             Require all granted

             <Files ~ "^\.ht">
                Require all denied

         <FilesMatch \.php$>
             SetHandler "proxy:fcgi://"

         ErrorLog /var/webs/wwwgreekgeo/log/error_log
         LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
    \"%{User-agent}i\"" combined
         CustomLog /var/webs/wwwgreekgeo/log/access_log combined
         LogLevel debug


As you can see, I have made efforts to enable php debugging, but I still 
can't see any php logging, in any php log:

    The file: /var/webs/wwwgreekgeo/log/php_error_log remains empty

I've also followed these directions to enable Wordpress php logging: 
https://codex.wordpress.org/WP_DEBUG but I didn't get any php logging 

Please advise: How can I enable full php logging and troubleshoot php on 
this vhost?

Also: What would you advise, if possible, on the particular problem (php 
processing hanging on this vhost only without any obvious reason)?

I've googled and tried many things for several hours, but I can't find a 

Thanks in advance,