Why my web server down for a while?

Noticed my LiteSpeed web server was stopped for a couple of hours. There was a gap during the down time between 03:49:27 and 10:51:58 in the error log.

more /var/log/httpd/error_log
2015-12-30 03:49:26.357 [NOTICE] litespeed (3762) is ready
2015-12-30 03:49:26.371 [NOTICE] [AutoRestarter] new child process with pid=3768 is forked!
2015-12-30 03:49:26.373 [NOTICE] [Child: 3768] Setup swapping space...
2015-12-30 03:49:26.373 [NOTICE] [child: 3768] Successfully change current user to apache
2015-12-30 03:49:26.373 [NOTICE] [Child: 3768] Core dump is enabled.
2015-12-30 03:49:26.374 [NOTICE] [Child: 3768] LiteSpeed/5.0.10 Enterprise starts successfully!
2015-12-30 03:49:27.009 [NOTICE] [AutoUpdate] Checking for new releases..., pid=3771
2015-12-30 03:49:27.048 [NOTICE] Start to clean up cache directory, pid=3772
2015-12-30 03:49:27.416 [INFO] [AutoUpdate] No new update.
2015-12-30 10:51:58.470 [NOTICE] Your License key will expire in 39 days
2015-12-30 10:51:58.470 [NOTICE] Loading LiteSpeed/5.0.10 Enterprise ...
2015-12-30 10:51:58.470 [NOTICE] Using [OpenSSL 1.0.2e 3 Dec 2015]
2015-12-30 10:51:58.472 [NOTICE] [ADMIN] server socket:  uds://usr/local/lsws/admin/tmp/admin.sock.7800
2015-12-30 10:51:58.473 [NOTICE] Loading configuration from /usr/local/lsws/conf/httpd_config.xml ...
2015-12-30 10:51:58.474 [NOTICE] [config] chroot is disabled.
2015-12-30 10:51:58.474 [INFO] old priority: 0, new priority: 0
2015-12-30 10:51:58.474 [INFO] [config:server:basic] For better obscurity, server version number is   hidden in the response header.
2015-12-30 10:51:58.475 [INFO] [/usr/local/lsws/bin/httpd] CloudLinux LVE is disabled.
2015-12-30 10:51:58.476 [NOTICE] [PID: 18945]: start cgid: 18948, /usr/local/lsws/bin/httpd

What happened?

Plesk control panel normally restarts web server quick often. It may also stop web server process for some reasons. If Web server can not be restarted properly, it will cause the downtime.

Check restart log:

more /usr/local/lsws/logs/lsrestart.log
LSWS does not restart properly, check port 7080
Wed Dec 30 03:49:24 IRST 2015
stop, LSWS running: 0
check port 7080 after kill all litespeed processes 

which shows LiteSpeed was killed by plesk.

For plesk, LiteSpeed configuration “Auto Reload On Changes” should be set to “Use Apache binary wrapper”. This will replace Apache httpd binary with a wrapper script. Whenever Apache is requested to start/stop/restart, the script will tell LSWS to take corresponding action.

Also it is critical to enable Plesk control panel web server monitoring at all time to avoid the web server service accidental stop. Watchdog is an plesk extension with such functionality.

To Enable it, go to Extensions → Watchdog → Services → Web Server (Apache) and enable it. Although it said “Apache”, it will monitor LiteSpeed web server process as well and restart it when it is not running. Actually it fixed restart problem for this case.

There might be some Apache configuration error, which is beyond the scope of this discussion, you might want to fix it separately.

  • Admin
  • Last modified: 2015/12/30 17:30
  • by Jackson Zhang