Help with EA4 Profile for mod_lsapi

Forcerdj

Well-Known Member
Nov 30, 2009
68
1
58
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 :)
 

Bazinga

Active Member
Verifed Vendor
Aug 23, 2016
32
7
8
Ukraine
cPanel Access Level
Website Owner
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"
 

Forcerdj

Well-Known Member
Nov 30, 2009
68
1
58
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.

Code:
[email protected] [~]# /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
[email protected] [~]# /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
 

Forcerdj

Well-Known Member
Nov 30, 2009
68
1
58
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?
 

cPMelaniel

Technical Analyst Supervisor
Staff member
Jun 25, 2013
9
1
78
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.
 

cPMelaniel

Technical Analyst Supervisor
Staff member
Jun 25, 2013
9
1
78
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.
 

Forcerdj

Well-Known Member
Nov 30, 2009
68
1
58
Ok thanks for clarification. I receive memory email each time a cron runs something is not right I have opened a ticket.
 

Bazinga

Active Member
Verifed Vendor
Aug 23, 2016
32
7
8
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.