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.

Help with EA4 Profile for mod_lsapi

Discussion in 'CloudLinux' started by Forcerdj, Oct 17, 2016.

Tags:
  1. Forcerdj

    Forcerdj Well-Known Member

    Joined:
    Nov 30, 2009
    Messages:
    60
    Likes Received:
    1
    Trophy Points:
    8
    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 :)
     
  2. Bazinga

    Bazinga Active Member

    Joined:
    Aug 23, 2016
    Messages:
    26
    Likes Received:
    5
    Trophy Points:
    3
    Location:
    Ukraine
    cPanel Access Level:
    Website Owner
    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"
     
  3. Forcerdj

    Forcerdj Well-Known Member

    Joined:
    Nov 30, 2009
    Messages:
    60
    Likes Received:
    1
    Trophy Points:
    8
    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.

    Code:
    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
     
  4. Forcerdj

    Forcerdj Well-Known Member

    Joined:
    Nov 30, 2009
    Messages:
    60
    Likes Received:
    1
    Trophy Points:
    8
    My bad I didn't restart Apache.

    So it's just the memory concern. Thanks
     
  5. Forcerdj

    Forcerdj Well-Known Member

    Joined:
    Nov 30, 2009
    Messages:
    60
    Likes Received:
    1
    Trophy Points:
    8
    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?
     
  6. cPMelaniel

    cPMelaniel Technical Analyst Supervisor
    Staff Member

    Joined:
    Jun 25, 2013
    Messages:
    9
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Houston,Tx
    cPanel Access Level:
    Root Administrator
    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.
     
  7. cPMelaniel

    cPMelaniel Technical Analyst Supervisor
    Staff Member

    Joined:
    Jun 25, 2013
    Messages:
    9
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Houston,Tx
    cPanel Access Level:
    Root Administrator
    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.
     
  8. Forcerdj

    Forcerdj Well-Known Member

    Joined:
    Nov 30, 2009
    Messages:
    60
    Likes Received:
    1
    Trophy Points:
    8
    Ok thanks for clarification. I receive memory email each time a cron runs something is not right I have opened a ticket.
     
  9. Bazinga

    Bazinga Active Member

    Joined:
    Aug 23, 2016
    Messages:
    26
    Likes Received:
    5
    Trophy Points:
    3
    Location:
    Ukraine
    cPanel Access Level:
    Website Owner
    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.
     
Loading...
Similar Threads - Help EA4 Profile
  1. clopezi
    Replies:
    3
    Views:
    449

Share This Page