FastCGI - Read failed?

Discussion in 'Installation/Configuration' started by ChuckSC, Feb 17, 2016.

  1. ChuckSC

    ChuckSC New Member

    Hello everyone,
    I was about to install the Dotclear blog CMS on my server (Debian Jessie + ISPConfig 3.0.5.4p8) and encountered a 500 error. I had to dig a bit into the logs to find out that apparently FastCGI is misbehaving:

    Apache error.log
    Code:
    [fastcgi:error] [pid 7569] (104)Connection reset by peer: [client xx.xxx.xxx.xxx:53160] FastCGI: comm with server "/var/www/clients/client1/web10/cgi-bin/php5-fcgi-*-443-blog.xyz.net" aborted: read failed
    [fastcgi:error] [pid 7569] [client xx.xxx.xxx.xxx:53160] FastCGI: incomplete headers (0 bytes) received from server "/var/www/clients/client1/web10/cgi-bin/php5-fcgi-*-443-blog.xyz.net"
    
    /var/log/php5-fpm.log
    Code:
    WARNING: [pool web10] child 7426 exited on signal 11 (SIGSEGV) after 121.102303 seconds from start
    NOTICE: [pool web10] child 7459 started
    
    /var/log/syslog
    Code:
    kernel: [1785022.597498] traps: php5-fpm[7426] general protection ip:6fb12d sp:7ffd6f872af0 error:0 in php5-fpm[400000+7f4000]
    
    I'm not exactly sure what is going on here, but it looks like something is wrong with FastCGI even though I'm not seeing this issue with other CMS/Sites installed on the server at this point. To be sure Dotclear was not at fault, I installed ISPConfig (perfect server documentation) on a local machine at home and it works fine there. And even though I Googled this error, I was not able to find a proper fix so far.

    Do you think FastCGI is to blame here? What should I do to troubleshoot this issue and possibly correct the problem on my server online?
    Any feedback welcome, thanks!
     
  2. ztk.me

    ztk.me ISPConfig Developer ISPConfig Developer

    Looks like your php crashed ... Since it works with other webs, something's going on with your web10.
    You could test $php-cgi index.php and see what it does.
    Maybe it's just doing some (initial) processing or semi cronjobs and gets stuck in a loop and is forced stop after 2 minutes.

    Try a simple php-file like <?php echo "hello world"; ?> on the web and see if it works.
    You also should turn on display_errors and set the error_reporting level when fiddling around.

    I think it'll tell you something, usually it's turned off by default and therefore it doesn't show any hints what's going wrong and just fails.
     
  3. ChuckSC

    ChuckSC New Member

    Thanks for your input. I'm able to run other basic php scripts in web10 and most pages in the back office of Dotclear are actually working fine. But unfortunately the blog itself is still giving me the same error. I'm ending up on the Internal Server Error and cannot see details.

    I also tried creating a new vhost under Sites >> Add new website to make a fresh install, but ended up with the same issue.
    Since it's working on my local server, which as far as I can tell was configured the same way: is there something I could do to reinstall php and related tools, if that could help?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Try to disable php caching plugins like xcache or opcache and restart php-fpm. Trying fastcgi mode instead of php-fpm might also be an option. Many "mysterious" php problems with no error messages are caused by them.
     
  5. ChuckSC

    ChuckSC New Member

    Thanks for your input as well. I added in "Custom php.ini settings" the following:
    Code:
    xcache.cacher = off;
    xcache.size = 0;
    xcache.stat = off;
    And I'm properly seeing the page now without any error in the logs :) that's good!

    So, I guess this is due to xcache rather than FastCGI. What should I do to attempt fixing this problem then? It may be better on the long term to correct this instead of bypassing xcache, don't you think?

    Thanks again for your help.
     
    isradelatorre likes this.
  6. ztk.me

    ztk.me ISPConfig Developer ISPConfig Developer

    I've never been a fan of xcache, always used apc/apcu and never had any issues whereas for php7 you may left with zend opcache until support has been adopted by others.
     
  7. isradelatorre

    isradelatorre New Member

    I had issues with osTicket and custom php.ini settings suggested by ChuckSC worked for me. Many thanks! :):):)
     
  8. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    The reason is there is no working xcache for php7 and above. The last working xcache version update is up to php5.6.
     

Share This Page