Skip to main content

Server Restart / Reload

Learning Focus

By the end of this lesson you will understand the difference between a graceful reload and a full restart, when to use each method, and how to verify that changes took effect safely.

Two Ways to Apply Changes

OpenLiteSpeed offers two restart methods. Choosing the right one matters for uptime.

MethodWhat HappensWhen to Use
Graceful ReloadWorkers finish current requests, then new configuration loadsMost configuration changes
Full RestartAll processes stop and start freshModule changes, binary upgrades, or when reload fails

Graceful Reload

A graceful reload re-reads configuration without dropping active connections. This is the safest default.

From the Command Line

# Preferred — graceful restart via the control script
sudo /usr/local/lsws/bin/lswsctrl restart

# Alternative — send the reload signal directly
sudo kill -USR1 $(cat /tmp/lshttpd/lshttpd.pid)

From WebAdmin

  1. Log into WebAdmin on port 7080.
  2. Click Actions → Graceful Restart in the top toolbar.
  3. Watch the status dashboard to confirm the reload completes.
info

A graceful reload is what you should use after editing listeners, virtual hosts, PHP handlers, rewrite rules, or SSL certificates.

Full Restart

A full restart stops and starts the server process entirely. Active connections are terminated.

# Stop the server
sudo systemctl stop lsws

# Start the server
sudo systemctl start lsws

# Or restart in one step
sudo systemctl restart lsws

When a Full Restart Is Needed

  • After upgrading the OpenLiteSpeed binary
  • After installing new server modules
  • When a graceful reload hangs or does not pick up changes
  • When you suspect a worker process is stuck

Verifying the Restart

After any restart or reload, always verify:

# 1) Check the service status
sudo systemctl status lsws

# 2) Confirm the process is running
ps aux | grep lshttpd

# 3) Check the error log for startup problems
tail -30 /usr/local/lsws/logs/error.log

# 4) Test a request
curl -I http://localhost

Common Mistakes

MistakeWhat HappensFix
Using full restart for routine config changesDrops active connections unnecessarilyUse graceful reload instead
Not checking error log after restartBroken config silently loadedAlways check /usr/local/lsws/logs/error.log
Restarting before saving config in WebAdminOld config reloadsClick Save in WebAdmin before restarting
Forgetting to test after restartBroken site goes unnoticedVerify with curl or browser
warning

Never assume a restart succeeded just because the command returned without error. Always verify with logs and a test request.

Key Takeaways

  • Graceful reload is the safe default — use it for configuration changes.
  • Full restart is for binary changes or when a reload is not enough.
  • Always verify with logs and a test request after any kind of restart.
  • Operational safety starts with choosing reload before restart.

What's Next