The Community Forums

Interact with an entire community of cPanel & WHM users.
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

php 5.5.16 (cli), PHP-FPM, Apache2.4, {Any opcache} = proxy_fgci:error Failed to read FastCGI header

Discussion in 'Workarounds and Optimization' started by Mindlash, Sep 7, 2014.

  1. Mindlash

    Mindlash Well-Known Member

    Joined:
    Jul 7, 2003
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    As the long title says, I'm getting what appear to be 503 'Service Unavailable' errors almost instantly on PHP sites (which have rewrites for URLs) as soon as I enable any opcache.

    I've tried xCache, APC and finally Zend OPcache

    Without an OPcache in place pages load fine/normal/sluggish (thus wanting a cache system in the first place)

    Here are various settings/info that may help you (The experianced and fresh-eyed one) to help me.


    Linux 2.6.32-358.2.1.el6.i686 #1 SMP Tue Mar 12 21:42:46 UTC 2013 i686 i686 i386 GNU/Linux
    Version: Apache/2.4.10 (Unix) OpenSSL/1.0.1e-fips mod_bwlimited/1.4 mod_fcgid/2.3.9 Server MPM: event
    Cpanel::Easy::Apache v3.26.7 rev9999
    CENTOS 6.5 i686 vmware
    WHM 11.44.1 (build 17)
    PHP 5.5.16 (cli)
    Zend Engine v2.5.0
    with the ionCube PHP Loader v4.6.1
    with Zend OPcache v7.0.4-dev, [currently disabled, configured manually]
    MySQL version: 5.5.37-cll


    I used sysally's cpHstack for speedy apache/php

    Various config settings are below:

    #/usr/local/etc/php-fpm.conf
    Code:
    [global]
    pid = /var/run/php-fpm/php-fpm.pid
    error_log = /var/log/php-fpm.log
    [nobody]
    user = nobody
    group = nobody
    listen = 127.0.0.1:9000
    pm = ondemand
    pm.max_children = 5
    pm.start_servers = 2
    pm.min_spare_servers = 1
    pm.max_spare_servers = 3
    request_terminate_timeout = 300s   ; have tried with default 0 as well
    include=/opt/xstack/cphstack/php-fpm.pool.d/*.conf
    #/opt/xstack/cphstack/php-fpm.pool.d/bob.conf [example user that generates 503s]
    Code:
    [bob]
    user = bob
    group = bob
    listen = /var/run/php-fpm/bob.sock
    listen.mode = 0666
    pm = ondemand
    pm.max_children = 15
    pm.start_servers = 2
    pm.min_spare_servers = 1
    pm.max_spare_servers = 3
    pm.max_requests = 256
    Apache httpd.conf for example user

    Code:
    <VirtualHost 192.81.76.117:80>
        ServerName bob.com
        ServerAlias www.bob.com
        DocumentRoot /home/bob/public_html
            <IfModule mod_proxy_fcgi.c>
                    ProxyPassMatch ^/(.*\.php(/.*)?)$ unix:/var/run/php-fpm/bob.sock|fcgi://localhost/home/bob/public_html/
            </IfModule>
        ServerAdmin webmaster@bob.com
        UseCanonicalName Off
        CustomLog /usr/local/apache/domlogs/bob.com combined
        CustomLog /usr/local/apache/domlogs/bob.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
        ## User bob # Needed for Cpanel::ApacheConf
        UserDir enabled bob
    
        # Enable backwards compatible Server Side Include expression parser for Apache versions >= 2.4.
        # To selectively use the newer Apache 2.4 expression parser, disable SSILegacyExprParser in
        # the user's .htaccess file.  For more information, please read:
        #    http://httpd.apache.org/docs/2.4/mod/mod_include.html#ssilegacyexprparser
        <IfModule mod_include.c>
            <Directory "/home/bob/public_html">
                SSILegacyExprParser On
            </Directory>
        </IfModule>
    
        <IfModule !mod_disable_suexec.c>
            <IfModule !mod_ruid2.c>
                SuexecUserGroup bob bob
            </IfModule>
        </IfModule>
        <IfModule mod_ruid2.c>
            RMode config
            RUidGid bob bob
        </IfModule>
        <IfModule itk.c>
            # For more information on MPM ITK, please read:
            #   http://mpm-itk.sesse.net/
            AssignUserID bob bob
        </IfModule>
        ScriptAlias /cgi-bin/ /home/bob/public_html/cgi-bin/
    
    
    #/etc/my.cnf
    Code:
    [mysqld]
    skip-name-resolve
    myisam_use_mmap=1
    max_connections=100
    max_user_connections=50
    log-slow-queries=mysql-slow.log
    long_query_time=0.1
    query_cache_type=1
    query_cache_size=75M
    query_cache_limit=5M
    join_buffer_size=1M
    read_rnd_buffer_size=1M
    max_allowed_packet=268435456
    tmp_table_size=50M
    max_heap_table_size=50M
    table_open_cache=10000
    thread_cache_size=25
    open_files_limit=30000
    key_buffer_size=500M
    myisam_sort_buffer_size=256M

    Portions of php.ini

    Code:
    [PHP]
    max_input_vars = 5000
    extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20121212"
    zend_extension="/usr/local/IonCube/ioncube_loader_lin_5.5.so"
    zend_extension=opcache.so
    opcache.enable=0 ; for now disabled 
    opcache.enable_cli=1
    opcache.memory_consumption=256  
    opcache.interned_strings_buffer=8  
    opcache.max_accelerated_files=300000  ; Using "find /home -type f -print | grep php | wc -l" produced 226540 php files. 
    opcache.max_wasted_percentage=5
    opcache.use_cwd=1
    opcache.validate_timestamps=0
    opcache.revalidate_freq=60  
    opcache.fast_shutdown=1
    

    # ulimit -a

    Code:
    core file size          (blocks, -c) 0
    data seg size           (kbytes, -d) unlimited
    scheduling priority             (-e) 0
    file size               (blocks, -f) unlimited
    pending signals                 (-i) 63796
    max locked memory       (kbytes, -l) 64
    max memory size         (kbytes, -m) unlimited
    open files                      (-n) 1024
    pipe size            (512 bytes, -p) 8
    POSIX message queues     (bytes, -q) 819200
    real-time priority              (-r) 0
    stack size              (kbytes, -s) 10240
    cpu time               (seconds, -t) unlimited
    max user processes              (-u) 63796
    virtual memory          (kbytes, -v) unlimited
    file locks                      (-x) unlimited
    

    Current PHP config string:
    PHP:
    './configure' '--disable-fileinfo' '--disable-posix' '--enable-bcmath' '--enable-calendar' '--enable-exif' '--enable-fastcgi' '--enable-fpm' '--enable-ftp' '--enable-gd-native-ttf' '--enable-intl' '--enable-libxml' '--enable-mbstring' '--enable-pdo=shared' '--enable-soap' '--enable-sockets' '--enable-wddx' '--enable-zip' '--prefix=/usr/local' '--with-bz2' '--with-curl=/opt/curlssl/' '--with-enchant=/usr' '--with-freetype-dir=/usr' '--with-gd' '--with-gettext' '--with-icu-dir=/usr' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libexpat-dir=/usr' '--with-libxml-dir=/opt/xml2' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-mysqli=/usr/bin/mysql_config' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-png-dir=/usr' '--with-pspell' '--with-snmp' '--with-tidy=/opt/tidy/' '--with-xmlrpc' '--with-xpm-dir=/usr' '--with-xsl=/opt/xslt/' '--with-zlib' '--with-zlib-dir=/usr'
    ###############################
    Various examples of errors from logs
    ###############################

    These are snapshots of the exact time I started php-fpm with cache enabled, to the time I disabled it and restarted.

    ==> /var/log/php-fpm.log <==

    Code:
    >> php-fpm engaged at this very second (12:36:29)
    [07-Sep-2014 12:36:29] WARNING: [pool bob] child 18563 exited on signal 11 (SIGSEGV) after 5.990368 seconds from start
    [07-Sep-2014 12:36:29] NOTICE: [pool bob] child 18873 started
    [07-Sep-2014 12:36:30] WARNING: [pool bob] child 18873 exited on signal 11 (SIGSEGV) after 1.083871 seconds from start
    [07-Sep-2014 12:36:30] NOTICE: [pool bob] child 18963 started
    [07-Sep-2014 12:36:31] WARNING: [pool bob] child 18963 exited on signal 11 (SIGSEGV) after 0.954668 seconds from start
    [07-Sep-2014 12:36:31] NOTICE: [pool bob] child 18995 started
    [07-Sep-2014 12:36:32] WARNING: [pool bob] child 18995 exited on signal 11 (SIGSEGV) after 0.751602 seconds from start
    [07-Sep-2014 12:36:32] NOTICE: [pool bob] child 18996 started
    [07-Sep-2014 12:36:32] WARNING: [pool bob] child 18996 exited on signal 11 (SIGSEGV) after 0.213105 seconds from start
    [07-Sep-2014 12:36:32] NOTICE: [pool bob] child 18997 started
    [07-Sep-2014 12:36:32] WARNING: [pool bob] child 18997 exited on signal 11 (SIGSEGV) after 0.221002 seconds from start
    [07-Sep-2014 12:36:32] NOTICE: [pool bob] child 18998 started
    [07-Sep-2014 12:36:33] WARNING: [pool bob] child 18998 exited on signal 11 (SIGSEGV) after 0.760944 seconds from start
    [07-Sep-2014 12:36:33] NOTICE: [pool bob] child 19002 started
    [07-Sep-2014 12:36:33] WARNING: [pool bob] child 19002 exited on signal 11 (SIGSEGV) after 0.261733 seconds from start
    [07-Sep-2014 12:36:33] NOTICE: [pool bob] child 19005 started
    [07-Sep-2014 12:36:34] WARNING: [pool bob] child 19005 exited on signal 11 (SIGSEGV) after 0.154066 seconds from start
    [07-Sep-2014 12:36:34] NOTICE: [pool bob] child 19008 started
    [07-Sep-2014 12:36:34] WARNING: [pool bob] child 19004 exited on signal 11 (SIGSEGV) after 0.474953 seconds from start
    [07-Sep-2014 12:36:34] NOTICE: [pool bob] child 19012 started
    [07-Sep-2014 12:36:35] WARNING: [pool bob] child 19008 exited on signal 11 (SIGSEGV) after 0.945875 seconds from start
    [07-Sep-2014 12:36:35] NOTICE: [pool bob] child 19019 started
    [07-Sep-2014 12:36:36] WARNING: [pool bob] child 19019 exited on signal 11 (SIGSEGV) after 1.790613 seconds from start
    [07-Sep-2014 12:36:36] NOTICE: [pool bob] child 19027 started
    [07-Sep-2014 12:36:38] WARNING: [pool bob] child 19012 exited on signal 11 (SIGSEGV) after 3.741505 seconds from start
    [07-Sep-2014 12:36:38] NOTICE: [pool bob] child 19032 started
    [07-Sep-2014 12:36:43] WARNING: [pool bob] child 19027 exited on signal 11 (SIGSEGV) after 7.144148 seconds from start
    [07-Sep-2014 12:36:43] NOTICE: [pool bob] child 19039 started
    >> php-fpm stoped at this very second (12:36:51)
    


    ==> /usr/local/apache/domlogs/bob.com <==

    I should note that sample.html is actually rewrite for a long php URL with variables (if that makes a difference)
    Code:
    >> php-fpm engaged at this very second (12:36:29)
    99.46.123.123 - - [07/Sep/2014:12:36:29 -0400] "GET /sample.html HTTP/1.1" 404 - "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36"
    99.46.123.123 - - [07/Sep/2014:12:36:30 -0400] "GET /sample.html HTTP/1.1" 404 - "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36"
    99.46.123.123 - - [07/Sep/2014:12:36:31 -0400] "GET /sample.html HTTP/1.1" 404 - "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36"
    99.46.123.123 - - [07/Sep/2014:12:36:32 -0400] "GET /sample.html HTTP/1.1" 404 - "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36"
    99.46.123.123 - - [07/Sep/2014:12:36:32 -0400] "GET /sample.html HTTP/1.1" 404 - "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36"
    99.46.123.123 - - [07/Sep/2014:12:36:32 -0400] "GET /sample.html HTTP/1.1" 404 - "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36"
    99.46.123.123 - - [07/Sep/2014:12:36:33 -0400] "GET /sample.html HTTP/1.1" 404 - "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36"
    99.46.123.123 - - [07/Sep/2014:12:36:33 -0400] "GET /sample.html HTTP/1.1" 404 - "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36"
    99.46.123.123 - - [07/Sep/2014:12:36:33 -0400] "GET /sample.html HTTP/1.1" 404 - "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36"
    99.46.123.123 - - [07/Sep/2014:12:36:34 -0400] "GET /sample.html HTTP/1.1" 404 - "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36"
    99.46.123.123 - - [07/Sep/2014:12:36:34 -0400] "GET /sample.html HTTP/1.1" 404 - "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36"
    99.46.123.123 - - [07/Sep/2014:12:36:36 -0400] "GET /sample.html HTTP/1.1" 500 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    99.46.123.123 - - [07/Sep/2014:12:36:38 -0400] "GET /sample.html HTTP/1.1" 404 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.0.3705)"
    99.46.123.123 - - [07/Sep/2014:12:36:43 -0400] "GET /sample.html HTTP/1.1" 404 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727 ; .NET CLR 4.0.30319)"
    99.46.123.123 - - [07/Sep/2014:12:36:33 -0400] "GET /sample.html HTTP/1.1" 404 - "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36"
    99.46.123.123 - - [07/Sep/2014:12:36:34 -0400] "GET /sample.html HTTP/1.1" 404 - "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36"
    99.46.123.123 - - [07/Sep/2014:12:36:34 -0400] "GET /sample.html HTTP/1.1" 404 - "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36"
    99.46.123.123 - - [07/Sep/2014:12:36:36 -0400] "GET /sample.html HTTP/1.1" 500 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
    99.46.123.123 - - [07/Sep/2014:12:36:38 -0400] "GET /sample.html HTTP/1.1" 404 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.0.3705)"
    99.46.123.123 - - [07/Sep/2014:12:36:43 -0400] "GET /sample.html HTTP/1.1" 404 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727 ; .NET CLR 4.0.30319)"
    >> php-fpm stopped at this very second (12:36:51)
    

    ==> /usr/local/apache/logs/error_log <==

    Code:
    >> php-fpm engaged at this very second (12:36:29)
    [Sun Sep 07 12:36:29.649587 2014] [proxy_fcgi:error] [pid 18321:tid 3007294320] [client 99.46.123.123:63905] AH01067: Failed to read FastCGI header, referer: http://www.bob.com/sample.html
    [Sun Sep 07 12:36:29.649751 2014] [proxy_fcgi:error] [pid 18321:tid 3007294320] (104)Connection reset by peer: [client 99.46.123.123:63905] AH01075: Error dispatching request to : , referer: http://www.bob.com/sample.html
    [Sun Sep 07 12:36:30.738449 2014] [proxy_fcgi:error] [pid 18321:tid 2996804464] [client 99.46.123.123:63906] AH01067: Failed to read FastCGI header, referer: http://www.bob.com/sample.html
    [Sun Sep 07 12:36:31.701594 2014] [proxy_fcgi:error] [pid 18327:tid 3049253744] [client 99.46.123.123:63913] AH01067: Failed to read FastCGI header, referer: http://www.bob.com/sample.html
    [Sun Sep 07 12:36:31.702132 2014] [proxy_fcgi:error] [pid 18327:tid 3049253744] (104)Connection reset by peer: [client 99.46.123.123:63913] AH01075: Error dispatching request to : , referer: http://www.bob.com/sample.html
    [Sun Sep 07 12:36:32.458038 2014] [proxy_fcgi:error] [pid 18327:tid 3038763888] [client 99.46.123.123:63914] AH01067: Failed to read FastCGI header, referer: http://www.bob.com/sample.html
    [Sun Sep 07 12:36:32.458501 2014] [proxy_fcgi:error] [pid 18327:tid 3038763888] (104)Connection reset by peer: [client 99.46.123.123:63914] AH01075: Error dispatching request to : , referer: http://www.bob.com/sample.html
    [Sun Sep 07 12:36:32.675140 2014] [proxy_fcgi:error] [pid 18321:tid 2986314608] [client 99.46.123.123:63915] AH01067: Failed to read FastCGI header, referer: http://www.bob.com/sample.html
    [Sun Sep 07 12:36:32.675452 2014] [proxy_fcgi:error] [pid 18321:tid 2986314608] (104)Connection reset by peer: [client 99.46.123.123:63915] AH01075: Error dispatching request to : , referer: http://www.bob.com/sample.html
    [Sun Sep 07 12:36:32.900476 2014] [proxy_fcgi:error] [pid 18321:tid 2975824752] [client 99.46.123.123:63916] AH01067: Failed to read FastCGI header, referer: http://www.bob.com/sample.html
    [Sun Sep 07 12:36:32.900942 2014] [proxy_fcgi:error] [pid 18321:tid 2975824752] (104)Connection reset by peer: [client 99.46.123.123:63916] AH01075: Error dispatching request to : , referer: http://www.bob.com/sample.html
    [Sun Sep 07 12:36:33.660517 2014] [proxy_fcgi:error] [pid 18320:tid 3049253744] [client 99.46.123.123:63918] AH01067: Failed to read FastCGI header, referer: http://www.bob.com/sample.html
    [Sun Sep 07 12:36:33.661050 2014] [proxy_fcgi:error] [pid 18320:tid 3049253744] (104)Connection reset by peer: [client 99.46.123.123:63918] AH01075: Error dispatching request to : , referer: http://www.bob.com/sample.html
    [Sun Sep 07 12:36:33.930709 2014] [proxy_fcgi:error] [pid 18321:tid 2965334896] [client 99.46.123.123:63920] AH01067: Failed to read FastCGI header, referer: http://www.bob.com/sample.html
    [Sun Sep 07 12:36:33.930840 2014] [proxy_fcgi:error] [pid 18321:tid 2965334896] (104)Connection reset by peer: [client 99.46.123.123:63920] AH01075: Error dispatching request to : , referer: http://www.bob.com/sample.html
    [Sun Sep 07 12:36:34.089357 2014] [proxy_fcgi:error] [pid 18321:tid 2954845040] [client 99.46.123.123:63919] AH01067: Failed to read FastCGI header, referer: http://www.bob.com/sample.html
    [Sun Sep 07 12:36:34.089503 2014] [proxy_fcgi:error] [pid 18321:tid 2954845040] (104)Connection reset by peer: [client 99.46.123.123:63919] AH01075: Error dispatching request to : , referer: http://www.bob.com/sample.html
    [Sun Sep 07 12:36:34.394262 2014] [proxy_fcgi:error] [pid 18327:tid 3028274032] [client 99.46.123.123:63921] AH01067: Failed to read FastCGI header, referer: http://www.bob.com/sample.html
    [Sun Sep 07 12:36:34.394461 2014] [proxy_fcgi:error] [pid 18327:tid 3028274032] (104)Connection reset by peer: [client 99.46.123.123:63921] AH01075: Error dispatching request to : , referer: http://www.bob.com/sample.html
    [Sun Sep 07 12:36:35.039435 2014] [proxy_fcgi:error] [pid 18321:tid 2944355184] [client 99.46.123.123:63922] AH01067: Failed to read FastCGI header, referer: http://www.bob.com/sample.html
    [Sun Sep 07 12:36:35.039588 2014] [proxy_fcgi:error] [pid 18321:tid 2944355184] (104)Connection reset by peer: [client 99.46.123.123:63922] AH01075: Error dispatching request to : , referer: http://www.bob.com/sample.html
    [Sun Sep 07 12:36:36.836937 2014] [proxy_fcgi:error] [pid 18320:tid 3028274032] [client 99.46.123.123:59320] AH01067: Failed to read FastCGI header
    [Sun Sep 07 12:36:36.837615 2014] [proxy_fcgi:error] [pid 18320:tid 3028274032] (104)Connection reset by peer: [client 99.46.123.123:59320] AH01075: Error dispatching request to : 
    [Sun Sep 07 12:36:38.141581 2014] [proxy_fcgi:error] [pid 18316:tid 3049253744] [client 99.46.123.123:50088] AH01067: Failed to read FastCGI header
    [Sun Sep 07 12:36:38.142196 2014] [proxy_fcgi:error] [pid 18316:tid 3049253744] (104)Connection reset by peer: [client 99.46.123.123:50088] AH01075: Error dispatching request to : 
    [Sun Sep 07 12:36:43.985547 2014] [proxy_fcgi:error] [pid 18315:tid 3049253744] [client 99.46.123.123:53978] AH01067: Failed to read FastCGI header
    [Sun Sep 07 12:36:43.986080 2014] [proxy_fcgi:error] [pid 18315:tid 3049253744] (104)Connection reset by peer: [client 99.46.123.123:53978] AH01075: Error dispatching request to : 
    >> php-fpm stopped at this very second (12:36:51)



    Any help is GREATLY appreciated. Once this is hammered out, I ultimately want to run a reverse proxy in front of apache, but this needs to be figured out first.

    Thanks in advance you super-smart people!

    -- ML
     
    #1 Mindlash, Sep 7, 2014
    Last edited: Sep 7, 2014
  2. Mindlash

    Mindlash Well-Known Member

    Joined:
    Jul 7, 2003
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    Re: php 5.5.16 (cli), PHP-FPM, Apache2.4, {Any opcache} = proxy_fgci:error Failed to read FastCGI he

    Just an update, but still no fix yes...

    I had a client call about an issue with not being able to see their files in a non-indexed directory (aka Options +Indexes wasn't working).

    I commented out the ProxyMatch line, and added a custom conf file which specifically allowed it for that vhost... and that worked. Otherwise, they were getting 404 (as it was looking for a specific index file) --

    SO, this raises the question, is the ProxyMatch inadvertantly trying to proxy a .htaccess file?

    Before this fix, the error_log showed:

    [proxy_fcgi:error] [pid 1826:tid 2818476912] [client 123.321.121.12:40024] AH01071: Got error 'Primary script unknown\n'

    ... curious...
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Re: php 5.5.16 (cli), PHP-FPM, Apache2.4, {Any opcache} = proxy_fgci:error Failed to read FastCGI he

    Hello :)

    I see that you are using Mod_FCGI for PHP. Have you made any FCGI configuration changes?

    Thank you.
     
  4. Mindlash

    Mindlash Well-Known Member

    Joined:
    Jul 7, 2003
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    Re: php 5.5.16 (cli), PHP-FPM, Apache2.4, {Any opcache} = proxy_fgci:error Failed to read FastCGI he

    Possibly... I've been all over the place.

    As they are now:


    /usr/local/apache/conf/php.conf

    # Fastcgi configuration for PHP5
    LoadModule fcgid_module modules/mod_fcgid.so
    MaxRequestsPerProcess 500
    AddHandler fcgid-script .php5 .php4 .php .php3 .php2 .phtml
    FcgidWrapper /usr/local/cpanel/cgi-sys/php5 .php5
    FcgidWrapper /usr/local/cpanel/cgi-sys/php5 .php4
    FcgidWrapper /usr/local/cpanel/cgi-sys/php5 .php
    FcgidWrapper /usr/local/cpanel/cgi-sys/php5 .php3
    FcgidWrapper /usr/local/cpanel/cgi-sys/php5 .php2
    FcgidWrapper /usr/local/cpanel/cgi-sys/php5 .phtml

    - - - Updated - - -

    Some other info you may want/need:


    # httpd -V | grep -A 2 'MPM:'
    Server MPM: event
    threaded: yes (fixed thread count)
    forked: yes (variable process count)



    httpd.conf

    # These can be set in WHM under 'Apache Global Configuration'
    Timeout 100
    TraceEnable On
    ServerSignature Off
    ServerTokens Full
    FileETag All
    StartServers 25
    <IfModule prefork.c>
    MinSpareServers 25
    MaxSpareServers 35
    </IfModule>
    <IfModule itk.c>
    MinSpareServers 25
    MaxSpareServers 35
    </IfModule>
    ServerLimit 256
    MaxRequestWorkers 200
    MaxConnectionsPerChild 12500
    KeepAlive On
    KeepAliveTimeout 5
    MaxKeepAliveRequests 100

    - - - Updated - - -

    Current memory:
    ps -ylC httpd | awk '{x += $8;y += 1} END {print "Apache Memory Usage (MB): "x/1024; print "Average Proccess Size (MB): "x/((y-1)*1024)}'
    Apache Memory Usage (MB): 138.809
    Average Proccess Size (MB): 15.4232

    - - - Updated - - -

    # httpd -l
    Compiled in modules:
    core.c
    mod_authn_file.c
    mod_authn_core.c
    mod_authz_host.c
    mod_authz_groupfile.c
    mod_authz_user.c
    mod_authz_core.c
    mod_access_compat.c
    mod_auth_basic.c
    mod_file_cache.c
    mod_socache_shmcb.c
    mod_socache_dbm.c
    mod_so.c
    mod_dbd.c
    mod_include.c
    mod_filter.c
    mod_deflate.c
    http_core.c
    mod_mime.c
    mod_log_config.c
    mod_logio.c
    mod_env.c
    mod_expires.c
    mod_headers.c
    mod_unique_id.c
    mod_setenvif.c
    mod_proxy.c
    mod_proxy_connect.c
    mod_proxy_http.c
    mod_proxy_fcgi.c
    mod_slotmem_shm.c
    mod_ssl.c
    event.c
    mod_unixd.c
    mod_status.c
    mod_autoindex.c
    mod_info.c
    mod_suexec.c
    mod_cgi.c
    mod_negotiation.c
    mod_dir.c
    mod_actions.c
    mod_userdir.c
    mod_alias.c
    mod_rewrite.c
     
  5. Mindlash

    Mindlash Well-Known Member

    Joined:
    Jul 7, 2003
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    Re: php 5.5.16 (cli), PHP-FPM, Apache2.4, {Any opcache} = proxy_fgci:error Failed to read FastCGI he

    I'm noticing as well, that I didn't seem to have an event.c directive....

    I just added this, and going to see how it does...

    Code:
    <IfModule event.c>
        StartServers          2
        MaxClients          150
        MinSpareThreads      25
        MaxSpareThreads      75
        ThreadLimit          64
        ThreadsPerChild	 25
        MaxRequestsPerChild   0
    </IfModule>
     
Loading...

Share This Page