litespeed.service failed because a configured resource limit was exceeded

codes9

Verified User
Joined
Sep 5, 2019
Messages
24
I've rebuilt rewrite configurations and I've been digging in the logs. Came across this tidbit when rebuilding. I'm unsure how to increase resource limits or troubleshoot this issue.

./build rewrite_confs

Checking to ensure /usr/local/lsws/ssl.crt/server.ca is set.
Using 157.245.40.8 for your server IP
PHP has been secured.
Defaulting to Comodo WAF SecDefaultAction...
Restarting openlitespeed.
Job for litespeed.service failed because a configured resource limit was exceeded. See "systemctl status litespeed.service" and "journalctl -xe" for details.

#> systemctl status litespeed.service -l
Dec 19 15:46:06 server19 systemd[1]: Starting The LiteSpeed HTTP Server...
Dec 19 15:46:06 server19 lswsctrl[19535]: [OK] Send SIGUSR1 to 24600
Dec 19 15:46:08 server19 systemd[1]: Refusing to accept PID outside of service control group, acquired through unsafe symlink chain: /tmp/lshttpd/lshttpd.pid
Dec 19 15:46:08 server19 systemd[1]: Refusing to accept PID outside of service control group, acquired through unsafe symlink chain: /tmp/lshttpd/lshttpd.pid
Dec 19 15:46:08 server19 systemd[1]: Failed to start The LiteSpeed HTTP Server.
Dec 19 15:46:08 server19 systemd[1]: Unit litespeed.service entered failed state.
Dec 19 15:46:08 server19 systemd[1]: litespeed.service failed.
Dec 19 15:47:01 server19 systemd[1]: Unit litespeed.service cannot be reloaded because it is inactive.
 

bdacus01

Verified User
Joined
Jul 22, 2017
Messages
1,093
Location
Murfreesboro
Maybe this helps


 

codes9

Verified User
Joined
Sep 5, 2019
Messages
24
Hi Brent, Thanks a lot for those informative links. I'll put them on my shortlist of very useful info.

Does not look like a memory issue like the message suggests initially. I found some mod security files referred to in the error where missing.

But after removing mod security I now have a new error when restarting OLS:

Refusing to accept PID outside of service control group, acquired through unsafe symlink chain: /tmp/lshttpd/lshttpd.pid

I notice this is related to a service still running after OLS changed from Initd to systemd

Seems like this change has not been incorporated into the ./build rewrite_confs

I just executed /usr/local/lsws/bin/lswsctrl start

Looks like everything is running now
 

codes9

Verified User
Joined
Sep 5, 2019
Messages
24
Just in case anyone has issues restarting OLS due to PID error

 

Meiji

Verified User
Joined
Jul 2, 2019
Messages
45
Hi,

After killing OpenLiteSpeed and restarting, it fails again after issuing a Let's Encrypt Certificate or updating Comodo ModSecurity rules.

Basically it fails when system needs to restart OpenLiteSpeed.

Is there any way to find out which resource limit it exceeded?
 

codes9

Verified User
Joined
Sep 5, 2019
Messages
24
I've found a thread that discusses monitoring by CSF

But some users online report that it can be quite irritating due to the nature of OLS being to run a process as long as possible.

Setting up a cron to restart OLS may help alleviate how long this affects end users. I know it's not a perfect solution yet.
I recall setting up a cron to reload OpenLitespeed each time a change in .htacess files are noticed. Directadmin only restarts OLS if .htaccess files are edited and saved from the UI. So sometimes changes don't get applied i.e. if you change something in Wordpress which affects .htaccess.

I notice that Mod security 3.x is compatible with OLS but not Mod Security 2.x
This link discusses the config of Comodo Modsecurity rules with OLS. (https://openlitespeed.org/kb/openlitespeed-modsecurity-module/)
Maybe a good place to start is to check compatibillity.

Strange I've not seen OpenLitespeed fail with Letsencrypt certificate renewal. On my servers it runs very smoothly without interruptions. Do you see anything in the logs that indicate the failure is due to OpenLitespeed & Letsencrypt?

Let me know what you find.
 

Meiji

Verified User
Joined
Jul 2, 2019
Messages
45
Let me know what you find.
It fails only when IPv6 is linked to an IPv4.

But it's way more complicated than that.

OLS developers have been working with this and released 3 version upgrades, still not fixed.
 
Top