php-fpm with ISPConfig on apache

Discussion in 'Installation/Configuration' started by erkan, May 18, 2012.

  1. erkan

    erkan New Member

    Found the solution now! PHP-FPM seems to be working fine now!
     
  2. erkan

    erkan New Member

    Ok PHP-FPM is working now and I have uploaded a test site. But the site isn´t so fast and it seem to be overloading my server. I hade the same problem with normal fcgi, I thought that PHP-FPM wouldn´t overload my server.

    Here is my test site: http://www.ffatest.se/

    Is there something I can do to make PHP-FPM to not overload my server?

    My server is a VPS with 3,5 GB RAM and 2 CPU cores.
     
  3. falko

    falko Super Moderator

    I suggest you install munin to find out what's going on. A server like yours shouldn't be overloaded with a simple Apache/PHP-FPM setup (unless you have loads of traffic), so I guess there's a problem somewhere else (maybe slow hard drives?).
     
  4. erkan

    erkan New Member

    It is a test site so it has no more than 5 visitors at one time. I have now installed Munin but I don´t know how to interpret the information. It would be great if you could take a look at it here:

    http://31.192.226.88/munin/ffatest.se/index.html
     
  5. till

    till Super Moderator

    Your system is currently idle, its not overloaded. It can have many different reasons when a site appears slow, e.g. inclusion of external content or javascript scripts that load slow, slow harddisk or programming mistakes in the site scripts.
     
  6. erkan

    erkan New Member

    If you try to access the site now you can see that it is barley loading:

    http://www.ffatest.se/

    Yes the RAM isn´t overloading right now but the site isn´t loading. If I restart apache the site will work normally for a while again before it stops loading again. If you wait long enough, a couple of hours, the RAM will overload.

    If I use mod php instead of PHP-FPM the site will load normally and the RAM will never overload, this only happends when I use FCGI in some form.
     
  7. till

    till Super Moderator

    There must be a general config issue on your server, the problem is not a php speed problem, maybe related to vlogger. We could have saved yourself a lot of time if you would have posted this indformation first instaed of asking for php-fpm. Check the global apache error.log and the error.log of the website for errors.
     
  8. erkan

    erkan New Member

    Where can I find the apache error log?

    I have attached the sites error log.
     

    Attached Files:

  9. till

    till Super Moderator

    /var/log/apache2/
     
  10. erkan

    erkan New Member

    The log seems to only contain one error but instead there are several hundred rows with that same error. Here it is:

    BEGIN failed--compilation aborted at /usr/local/ispconfig/server/scripts/vlogger line 148.
    piped log program ' /usr/local/ispconfig/server/scripts/vlogger -s access.log -t "%Y%m%d-access.log" -d "/etc/vlogger-dbi.conf" /var/log/ispconfig/httpd' failed unexpectedly
    Can't locate Date/Format.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl) at /usr/local/ispcon$
     
  11. till

    till Super Moderator

    There is a perllibrary missing. Please run:

    apt-get install libtimedate-perl libdbi-perl

    and then restart apache.
     
  12. erkan

    erkan New Member

    Ok I have done that now, do you think that was the problem?
     
  13. till

    till Super Moderator

    Yes, that was most likely the whole problem.
     
  14. erkan

    erkan New Member

    Ok good, I will stress test the site now then and check if it works as it should.
     
  15. till

    till Super Moderator

    Do you have already a php binary cache like xcache or apc installed? If not, then run:

    apt-get install php5-xcache

    and restart apache before you do the load tests.
     
  16. erkan

    erkan New Member

    Yes I have APC installed.
     
  17. erkan

    erkan New Member

    Yes it seems to be working correct now!

    Another thing, I was going to install mod security but I can´t seem to find a guide that works.

    I tried this guide but replaced the version number with 2.6.5 instead which is the latest version:

    http://www.crucialp.com/resources/t...ng/how-to-install-mod_security-for-apache.php

    But when I run:

    tar zxvf mod_security-2.6.5.tar.gz

    I get this error message:

    gzip: stdin: not in gzip format
    tar: Child returned status 1
    tar: Error is not recoverable: exiting now
     
  18. falko

    falko Super Moderator

    You can try this:
    Code:
    mv mod_security-2.6.5.tar.gz mod_security-2.6.5.tar
    tar xvf mod_security-2.6.5.tar
     
  19. erkan

    erkan New Member

    Now I get this message instead:

    tar: This does not look like a tar archive
    tar: Skipping to next header
    tar: Exiting with failure status due to previous errors
     
  20. erkan

    erkan New Member

    Where can I report bugs for ISPConfig 3.0.5?
     

Share This Page