Skip to main content

Help with EA4 Profile for mod_lsapi

Comments

8 comments

  • Bazinga
    Hi Guys, I have just upgraded one of our servers to EasyApache 4 as we would like to test mod_lsapi. We're given so much choice compared to EA3 we're a little unsure which profile we should select. At the moment Apache is using MPM Prefork, most of the packages change to Worker. I could of course just change the current profile to include lsapi but don't want to rule out one of the new profiles if we can expect performance improvements. The lsapi profiles currently on offer are: CloudLinux + All PHP Options + OpCache + mod_lsapi CloudLinux + All PHP Options + ZendGuard + mod_lsapi CloudLinux + cPanel Default + mod_lsapi I'm assuming cPanel Default will be the way to go, or will we benefit from switching to OpCache? Any assistance appreciated :)

    lsapi with opcache is the best option as chache is shared between lsphp procesess, so use first one: "CloudLinux + All PHP Options + OpCache + mod_lsapi"
    0
  • Forcerdj
    lsapi with opcache is the best option as chache is shared between lsphp procesess, so use first one: "CloudLinux + All PHP Options + OpCache + mod_lsapi"

    Thanks for your assistance I have a few more questions if you don't mind. Memory usage has almost doubled since I changed to CloudLinux + All PHP Options + OpCache + mod_lsapi, I haven't touched any configuration yet, but is this normal? Also, I want to now enable mod_lsapi but it does not appear to be selectable from the PHP handler section. I looked in documentation and it says run commands: /usr/bin/switch_mod_lsapi --setup /usr/bin/switch_mod_lsapi --enable-global However, when I do this I get the following, I'm not sure if errors, but it does not seem to work as pages still being served from FastCGI.
    root@server [~]# /usr/bin/switch_mod_lsapi --setup Instruction: http://docs.cloudlinux.com/index.html?apache_mod_lsapi.html SUPHP deteceted info [rebuildhttpdconf] Missing owner for domain server.domain.com, force lookup to root Built /etc/apache2/conf/httpd.conf OK Reconfiguration completed root@server [~]# /usr/bin/switch_mod_lsapi --enable-global Instruction: http://docs.cloudlinux.com/index.html?apache_mod_lsapi.html info [rebuildhttpdconf] Missing owner for domain server.domin.com, force lookup to root Built /etc/apache2/conf/httpd.conf OK
    Can you help? Thanks
    0
  • Forcerdj
    My bad I didn't restart Apache. So it's just the memory concern. Thanks
    0
  • Forcerdj
    I'm back again. Is it normal that this new configuration will use more memory? I am receiving a lot of excessive virtual memory warnings. I know this is a csf error but is coming from increased memory usage. Resource: Virtual Memory Size Exceeded: 415 > 400 (MB) Executable: /opt/cpanel/ea-php56/root/usr/bin/lsphp.cagefs Command Line: lsphp:/home/xxxx/public_html/index.php PID: 477615 (Parent PID:477541) Killed: No I'm not too concerned, I can increase this limit if required. However, I also noticed this: Resource: Virtual Memory Size Exceeded: 430 > 400 (MB) Executable: /opt/cpanel/ea-php56/root/usr/bin/php-cgi.cagefs Command Line: /opt/cpanel/ea-php56/root/usr/bin/php-cgi -q /home/xxxxxxx/crons/pop.php PID: 425216 (Parent PID:425205) Killed: No It looks like crons are still running under php-cgi Is this normal?
    0
  • cPMelaniel
    Yes. We made this change in EA-4900. This was to update the EA4 php-wrapper to point to php-cgi instead of php-cli so that cron PHP applications will behave properly with respects to relative config include paths. I'm not aware that this would cause an increase in memory usage however. Please consider opening a support request so we may investigate further.
    0
  • cPMelaniel
    Additionally, please ensure you have completed stopped and started Apache after switching to LSAPI. Else, you can still have some PHP processes running as the old handler.
    0
  • Forcerdj
    Ok thanks for clarification. I receive memory email each time a cron runs something is not right I have opened a ticket.
    0
  • Bazinga
    Memory consumtpion after switching to lsphp should be higher as we are talking about lsphp daemon processes that stays alive. Websites with lsphp are faster but yes, you 'pay' for it with a memory.
    0

Please sign in to leave a comment.