Litespeed server is restarting every minute or less

#1
Hi,

Tonight, I have migrated one of my sites from shared hosting to my own droplet with Ubuntu 18.10 (2CPU, 4GB ram) with Litespeed 1.4.40 and MariaDB.
The server is handling quite a lot requests every second. However, I am noticing that the Litespeed server is auto restarting constantly. It runs for less than a minute and then it restarts.

I have already disabled the option to auto restart because of the 503 errors, but the issue still persists.

This is one of the many outputs in error.log (they are mostly the same).

2020-06-04 08:48:16.818786 [NOTICE] [AutoRestarter] child process with pid=4214 received signal=11, a core file is created!
2020-06-04 08:48:17.616671 [NOTICE] [AutoRestarter] cleanup children processes and unix sockets belong to process 4214 !
2020-06-04 08:48:17.717176 [NOTICE] [AutoRestarter] new child process with pid=4236 is forked!
2020-06-04 08:48:17.717617 [INFO] Stop listener *:7080.
2020-06-04 08:48:17.718065 [NOTICE] [child: 4236] Successfully change current user to nobody
2020-06-04 08:48:17.718093 [NOTICE] Child: 4236] Core dump is enabled.
2020-06-04 08:48:17.718125 [NOTICE] [Child: 4236] Setup swapping space...
2020-06-04 08:48:17.718199 [NOTICE] [Child: 4236] LiteSpeed/1.4.40 Open starts successfully!
2020-06-04 08:48:17.856756 [INFO] Tried to add new context: URI /REDACTED/ location /REDACTED/, result 0x5577dffa5840
2020-06-04 08:48:17.951024 [INFO] Tried to add new context: URI /REDACTED/ location /REDACTED/, result 0x5577dffa1c40
2020-06-04 08:48:18.031763 [INFO] Tried to add new context: URI /REDACTED/ location /REDACTED/, result 0x5577dffa4590

One of these errors even had this line:
2020-06-04 08:42:36.220126 [WARN] [AutoRestarter] forking too frequently, suspend for a while!

When checking the core dump file with gdb /usr/local/lsws/bin/openlitespeed /tmp/lshttpd/bak_core/core command, this was in it:

warning: core file may not match specified executable file.
[New LWP 5579]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `openlitesp'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00005558116688cc in HttpSession::eek:nInitConnected() ()
(gdb) bt
#0 0x00005558116688cc in HttpSession::eek:nInitConnected() ()
#1 0x00005558116886be in SpdyStream::eek:nInitConnected() ()
#2 0x0000555811685f15 in SpdyConnection::processSynStreamFrame(SpdyFrameHeader*) ()
#3 0x0000555811687c58 in SpdyConnection::eek:nReadEx2() ()
#4 0x0000555811687e3e in SpdyConnection::eek:nReadEx() ()
#5 0x0000555811650153 in NtwkIOLink::handleEvents(short) ()
#6 0x00005558116bd659 in epoll::waitAndProcessEvents(int) ()
#7 0x0000555811643cfc in EventDispatcher::run() ()
#8 0x000055581161fba0 in HttpServerImpl::start() ()
#9 0x00005558115fa904 in LshttpdMain::main(int, char**) ()
#10 0x00005558115fa842 in main ()

Does anyone have an idea what might cause this issue?
I am suspecting that it could be a memory issue, but there is not one out of memory exception in log files.
 
#2
From what I see now when I am monitoring the server, the Litespeed reloads the server every time when too many requests come in at the same time.
There are currently from 50-120 requests per second.
Also, the load average on the Ubuntu is usually around 2 when this happens, as the server appears to be a bit overloaded. But it doesn't seem that there would be any shortage of ram. Usually, a around 1.8GB of 4GB is being used.
The CPU is also almost never on 100%, but the load average is almost always above 1, sometimes even 6 or 8.

I am posting this here in case any of you guys have a better idea on what to do ;)
 
#4
Thank you for your reply.
I am not sure what core file location has to do with it, but I will try with a new instance of Ubuntu and the newest release of OLS tomorrow.
Hopefully it will help.
 
#6
Thanks for explaining.
I will check for php errors, but as I already mentioned, I disabled the funtionality which restarts the server if 503 errors occur. That is why it all seems very weird that the server is constantly being restarted.
 
#7
I have just created a new droplet (2 CPU, 4 GB RAM) with Ubuntu 20.4 and installed Open Litespeed 1.6.13 and MariaDB 10.3.
Things are looking much better now. After the whole server was moved to this droplet and traffic redirected, Litespeed server is operating beautifully.
For now, it didn't yet restart itself and everything looks quite good.
Even the load average on the server almost never goes over 1 :D

Thanks for all the help @Pong.
 
Top