How to setup Cloud Linux LVE properly and AllowOveride Warning

#1
Hi,

We've been using LiteSpeed now for a while now with Cloud Linux and MariaDB. Recently we decided to do an SEO scan on one of the sites from an office PC and the CPU shoots right up to 95% or more. We have the account limited but it seems like the LVE is not being used at all. Going through our settings we found Cloud Linux setting but triggering it lost us the use of the PHP Selector and our site went back to PHP 5.5.

We've looked at some of the documentation but we are not sure what the correct settings are to get it functioning correctly. We have new relic and it was showing lsphp consuming the most CPU time.

Could someone let us know what we need to change to get it functioning properly? I'll post screenshots below.

We also have another issue with 'Directive 'AllowOverride' is not allowed in current context.', when we sign in to the LiteSpeed panel we have these warnings show:
Code:
2017-02-04 23:14:22.438 WARN /usr/local/apache/conf/httpd.conf:70: Directive 'AllowOverride' is not allowed in current context.
2017-02-04 23:14:22.438 WARN /usr/local/apache/conf/httpd.conf:70: Directive 'AllowOverride' is not allowed in current context.
2017-02-04 23:14:22.438 WARN /usr/local/apache/conf/httpd.conf:76: Directive 'AllowOverride' is not allowed in current context.
2017-02-04 23:14:22.438 WARN /usr/local/apache/conf/httpd.conf:76: Directive 'AllowOverride' is not allowed in current context.
2017-02-04 23:14:22.438 WARN /usr/local/apache/conf/httpd.conf:110: Directive 'AllowOverride' is not allowed in current context.
2017-02-04 23:14:22.438 WARN /usr/local/apache/conf/httpd.conf:110: Directive 'AllowOverride' is not allowed in current context.
Does anyone know how to resovle this?

Thanks in advance for any help and if you need anymore information please let me know,

Here are some of our server details:

4 x Intel(R) Xeon(R) CPU E5-2430 0 @ 2.20GHz
7.8GB RAM
CLOUDLINUX 6.8 x86_64 virtuozzo

Litespeed Web Server Enterprise 5.1.11
10.0.28-MariaDB - MariaDB Server

Here is some screenshots of the Litespeed Panel:

Untitled.png
Untitled2.png

Untitled3.png

Untitled4.png
 
Last edited by a moderator:

NiteWave

Administrator
#2
2017-02-04 23:14:22.438 WARN /usr/local/apache/conf/httpd.conf:70: Directive 'AllowOverride' is not allowed in current context.
per https://httpd.apache.org/docs/2.4/mod/core.html#allowoverride
AllowOverride have to be in a "directory" context, i.e., within a <Directory ..> </Directory> block. otherwise, will issue this warning and will be ignored.

CPU shoots right up to 95% or more
lsphp consuming the most CPU time
CPU 95% refer web server's CPU(not office PC's CPU) ?
usually a web site's bottle neck is at php/mysql side.
optimize php code
add php opcode cache
add page cage (like lscache plugin for wordpress)
is the effective way to reduce web server's CPU usage
 
#3
Hi NiteWave,

I'll give that a go and let you know the results with the AllowOveride issue.

CPU 95% refer web server's CPU(not office PC's CPU) ?

With the CPU percentage I used I should of been more clear and said these values were from New Relic, I should of added the data straight away, here is what says now:

Untitled5.png
usually a web site's bottle neck is at php/mysql side.
Were looking into this, this site in question has MyISAM tables which we are thinking would be better as InnoDB or xtraDB. We know we might need to change some DB settings, do you have any reccomendations for this?

optimize php code
What exsactly do you mean here? The websites using PHP 7.0.13, we've done all the usual things on the website to optimise it as well. GTMetrix rates most pages A & B with roughly 2 sec load times, even when the CPU is under heavy load.

add php opcode cache

This is switched on and cache rate is 100%, we have been trying to get apcu working with opcache.

add page cage (like lscache plugin for wordpress) is the effective way to reduce web server's CPU usage

We are using LSCache as we have the enterprise version of the software.

All the above however doesn't relate to getting the LVE manager working, if this was working (We would still have performance issues on the site level) it should cap the account to the CPU level we specify?

Appreciate your help.
 
#4
Hi,

I've just looked over the AllowOveride settings and they are in a <Directory ..> </Directory> block, here is an example:
Code:
<Directory "/">
   AllowOverride All
   Options ExecCGI FollowSymLinks IncludesNOEXEC Indexes SymLinksIfOwnerMatch
</Directory>
Is this wrong?

Thanks
 
Last edited by a moderator:

NiteWave

Administrator
#5
please refer
https://www.litespeedtech.com/suppo...cloudlinux:cl_lve_vs_lsws_php_suexec_max_conn

your current "PHP suEXEC Max Conn" is 3, it's related with cloudlinux's LVE EP limit.

4 x Intel(R) Xeon(R) CPU E5-2430 0 @ 2.20GHz
the CPU has 6 cores, so the server has total 24 cores. looking at your load average grade, max is 4. for a 24 cores server, load 24 is normal.

We have the account limited but it seems like the LVE is not being used at all.
since this is a cloudlinux feature, I actually haven't much experience on it and don't understand it well.
just took a look at cloudlinux's document, https://docs.cloudlinux.com/index.html?cpu_limits.html , CPU limits is "no longer used, and SPEED is used instead". you may need ask cloudlinx how to test LVE limit (especially CPU or SPEED) for greater details.
 
#6
Hi,

I've increased PHP suEXEC Max Conn to 5 now, it was 10 before.

With our setup its a VPS so we only have 4 cores allocated.

We are aware of the change in limits, and before we switched to LiteSpeed it was working.
What I am saying is under general -> server process -> cloud linux, its set to CageFS.
For the LVE to work with LiteSpeed I assume this setting should be LVE?.
When we switch to LVE we loose the Cloud Linux PHP selector.

This must mean we have something wrong with the above configuration?

I guess it might be better to ask on the Cloud Linux forums for this particular issue?

Thanks
 

NiteWave

Administrator
#7
For the LVE to work with LiteSpeed I assume this setting should be LVE?.
No. should set as CageFS. "LVE" is an very old option when Cloudlinux's CageFS not exist yet.

We are aware of the change in limits, and before we switched to LiteSpeed it was working.
can you be more specific about working or not working ? it looks like I've caught your point until now.
so your question is: under apache, LVE limits works; after switching to litespeed, LVE limits not working ?
can you switch between apache and litespeed to reproduce the issue easily ?
 
#8
Okay so your saying our settings are all good and well?

We will try and turn off LiteSpeed next week and see if it starts limiting again.

Talking in terms of performance, you mention the database is a common bottleneck, is it worth running a seperate database/multiple databases?

Is it worth looking at Memcached as well?

Thanks for your reply and I will let you know the results of switching back top apache.
 

NiteWave

Administrator
#9
Okay so your saying our settings are all good and well?
yes.

regarding database, best you discuss with database expert :) we're not.
our point is: static page(image, js, css etc) is served by web server(here litespeed) directly. dynamic page is generated by backend php/mysql, usually it's much slower than static page. so we say usually the bottle neck is at php/mysql side. for particular server, bottle neck may vary. some may be php only, some may be mysql only, some may be both. some may be network/disk io etc. identifying the bottle neck first is a general good method for troubleshooting.
 

Crazy Serb

Well-Known Member
#10
Wait, I got a question about this whole General -> CloudLinux -> LVE / CageFS setting.

Why can't we set it as LVE and have to set it as CageFS?

If I set it to LVE, I get CloudLinux LVE section in WHM working just fine, showing proper stats and all, and I can see which users are hitting any sort of ceiling at any given point.

If I set this to CageFS, I don't get anything in LVE section in WHM... I pretty much disable it.

And what's the performance benefit of CageFS over LVE, if there is any? I thought it's only for security measure to prevent users from accessing/executing each other's files and all, no?

Can you please elaborate on this a bit more?

Thanks.
 
Top