LSWS Server restarts every minute

The LSWS server restarts every minute + it generates a lot of small log files. The strange thing is that the server is fully responsive. I didn’t notice that it is sometimes unavailable.

Maybe it’s a cron job? but i don’t know exactly what to look for.

Or some bug caused by moving from OLS to LSWS.

lsrestart.log below

Sun 01 Jan 2023 01:19:26 AM CET
start, LSWS running: 1
Sun 01 Jan 2023 01:21:02 AM CET
start, LSWS running: 1
Sun 01 Jan 2023 01:22:37 AM CET
start, LSWS running: 1
Sun 01 Jan 2023 01:24:13 AM CET
start, LSWS running: 1
Sun 01 Jan 2023 01:25:48 AM CET
start, LSWS running: 1
Sun 01 Jan 2023 01:27:24 AM CET
start, LSWS running: 1
Sun 01 Jan 2023 01:28:59 AM CET
start, LSWS running: 1
Sun 01 Jan 2023 01:30:35 AM CET
start, LSWS running: 1
Sun 01 Jan 2023 01:32:10 AM CET
start, LSWS running: 1
Sun 01 Jan 2023 01:33:46 AM CET
start, LSWS running: 1
Sun 01 Jan 2023 01:35:21 AM CET
start, LSWS running: 1
Sun 01 Jan 2023 01:36:56 AM CET
start, LSWS running: 1
Sun 01 Jan 2023 01:38:32 AM CET
start, LSWS running: 1
Sun 01 Jan 2023 01:40:07 AM CET
start, LSWS running: 1
Sun 01 Jan 2023 01:41:43 AM CET
start, LSWS running: 1
Sun 01 Jan 2023 01:43:18 AM CET
start, LSWS running: 1
Sun 01 Jan 2023 01:44:54 AM CET
start, LSWS running: 1
Sun 01 Jan 2023 01:46:29 AM CET
start, LSWS running: 1
Sun 01 Jan 2023 01:48:05 AM CET
start, LSWS running: 1

EDIT:

I think that will explain a lot (error.log):

2022-12-31 17:20:43.249891 [ALERT] [3673] [T0] LiteSpeed/6.0.12 Enterprise starts successfully!
2022-12-31 17:21:34.150392 [INFO] [3673] [T0] [91.225.135.67:28239:HTTP2-1#_AdminVHost] add child process pid: 3687, procinfo: 0x2c92800
2022-12-31 17:22:13.020800 [INFO] [3673] [T0] Process with PID: 3687 is dead 
2022-12-31 17:22:18.542946 [NOTICE] [3670] [T0] [3670] Server Restart Request via Signal...
2022-12-31 17:22:18.543326 [INFO] [3670] [T0] Stop all listeners.
2022-12-31 17:22:18.543349 [INFO] [3670] [T0] Stop listener *:443.
2022-12-31 17:22:18.543362 [INFO] [3670] [T0] Stop listener *:80.
2022-12-31 17:22:18.543372 [INFO] [3670] [T0] Stop listener [::]:443.
2022-12-31 17:22:18.543376 [INFO] [3670] [T0] Stop listener [::]:80.
2022-12-31 17:22:18.543380 [INFO] [3670] [T0] Stop listener *:7080.
2022-12-31 17:22:18.543388 [NOTICE] [3670] [T0] Stop all children workers, nowait=0
2022-12-31 17:22:18.543587 [NOTICE] [3670] [T0] Forked [3702] for graceful restart.
2022-12-31 17:22:18.543606 [NOTICE] [3670] [T0] Start passing listener sockets through forked child [3702].
2022-12-31 17:22:18.543617 [INFO] [3702] [T0] [*:7080] Pass listener, copy fd 15 to 1006.
2022-12-31 17:22:18.543627 [INFO] [3702] [T0] [[::]:80] Pass listener, copy fd 14 to 1005.
2022-12-31 17:22:18.543632 [INFO] [3702] [T0] [UDP [::]:443] pass listener, copy fd 13 to 1004.
2022-12-31 17:22:18.543635 [INFO] [3702] [T0] [[::]:443] Pass listener, copy fd 12 to 1003.
2022-12-31 17:22:18.543638 [INFO] [3702] [T0] [*:80] Pass listener, copy fd 11 to 1002.
2022-12-31 17:22:18.543642 [INFO] [3702] [T0] [UDP *:443] pass listener, copy fd 10 to 1001.
2022-12-31 17:22:18.543648 [INFO] [3702] [T0] [*:443] Pass listener, copy fd 9 to 1000.
2022-12-31 17:22:18.543659 [NOTICE] [3702] [T0] Starting new instance: execute '/usr/local/lsws/bin/litespeed'.
2022-12-31 17:22:18.746294 [NOTICE] [3670] [T0] [AutoRestarter] cleanup children processes and unix sockets of process with pid=3673 !
2022-12-31 17:22:18.746307 [NOTICE] [3670] [T0] [AutoRestarter] child process with pid=3673 exited with status=0!
2022-12-31 17:22:18.746343 [NOTICE] [3670] [T0] Main server stopped!

Full error.log: error.log LSWS<!-- --> — Codefile

Can you tell me the cyberpanel version of your server?

Version: 2.3. Build: 2. I updated two days ago.

syslog:

Jan  1 20:23:05  systemd[1]: lshttpd.service: Can't open PID file /run/openlitespeed.pid (yet?) after start: Operation not permitted
Jan  1 20:24:32  systemd[1]: lshttpd.service: start operation timed out. Terminating.
Jan  1 20:24:32  systemd[1]: lshttpd.service: Failed with result 'timeout'.
Jan  1 20:24:32  systemd[1]: Failed to start OpenLiteSpeed HTTP Server.
Jan  1 20:24:37  systemd[1]: lshttpd.service: Scheduled restart job, restart counter is at 1029.
Jan  1 20:24:37  systemd[1]: Stopped OpenLiteSpeed HTTP Server.
Jan  1 20:24:37  systemd[1]: lshttpd.service: Found left-over process 50344 (litespeed) in control group while starting unit. Ignoring.
Jan  1 20:24:37  systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Jan  1 20:24:37  systemd[1]: lshttpd.service: Found left-over process 50345 (lscgid) in control group while starting unit. Ignoring.
Jan  1 20:24:37  systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Jan  1 20:24:37  systemd[1]: lshttpd.service: Found left-over process 50346 (httpd) in control group while starting unit. Ignoring.
Jan  1 20:24:37  systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Jan  1 20:24:37  systemd[1]: lshttpd.service: Found left-over process 50347 (litespeed) in control group while starting unit. Ignoring.
Jan  1 20:24:37  systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Jan  1 20:24:37  systemd[1]: Starting OpenLiteSpeed HTTP Server...
Jan  1 20:24:37  lswsctrl[50367]: [OK] Send SIGUSR1 to 50344
Jan  1 20:24:40  systemd[1]: lshttpd.service: Can't open PID file /run/openlitespeed.pid (yet?) after start: Operation not permitted
Jan  1 20:26:07  systemd[1]: lshttpd.service: start operation timed out. Terminating.
Jan  1 20:26:07  systemd[1]: lshttpd.service: Failed with result 'timeout'.
Jan  1 20:26:07  systemd[1]: Failed to start OpenLiteSpeed HTTP Server.
Jan  1 20:26:13  systemd[1]: lshttpd.service: Scheduled restart job, restart counter is at 1030.
Jan  1 20:26:13  systemd[1]: Stopped OpenLiteSpeed HTTP Server.
Jan  1 20:26:13  systemd[1]: lshttpd.service: Found left-over process 50377 (litespeed) in control group while starting unit. Ignoring.
Jan  1 20:26:13  systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Jan  1 20:26:13  systemd[1]: lshttpd.service: Found left-over process 50378 (lscgid) in control group while starting unit. Ignoring.
Jan  1 20:26:13  systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Jan  1 20:26:13  systemd[1]: lshttpd.service: Found left-over process 50379 (httpd) in control group while starting unit. Ignoring.
Jan  1 20:26:13  systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Jan  1 20:26:13  systemd[1]: lshttpd.service: Found left-over process 50380 (litespeed) in control group while starting unit. Ignoring.
Jan  1 20:26:13  systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Jan  1 20:26:13  systemd[1]: Starting OpenLiteSpeed HTTP Server...
Jan  1 20:26:13  lswsctrl[50432]: [OK] Send SIGUSR1 to 50377
Jan  1 20:26:16  systemd[1]: lshttpd.service: Can't open PID file /run/openlitespeed.pid (yet?) after start: Operation not permitted

It looks like it tried to turn on OLS but was unable to. Time and frequency match logs from error.log.
Maybe this problem is due to the fact that it was OLS to begin with and I entered LSWS licenses. LSWS was not installed on a clean server.

I found topic with similar problem - I need httpd.conf file for litespeed Enterprise

@mesut solution helped:

5- i used systemctl list-unit-files command and saw openlitespeed active as long as in the logs it seems to want to start still,
6- i entered below command in ssh and restarting of webserver fixed.

systemctl disable openlitespeed

Thank you for your involvement in solving my problem!

1 Like

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.