Server Restart / Reload
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.
| Method | What Happens | When to Use |
|---|---|---|
| Graceful Reload | Workers finish current requests, then new configuration loads | Most configuration changes |
| Full Restart | All processes stop and start fresh | Module 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
- Log into WebAdmin on port
7080. - Click Actions → Graceful Restart in the top toolbar.
- Watch the status dashboard to confirm the reload completes.
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
| Mistake | What Happens | Fix |
|---|---|---|
| Using full restart for routine config changes | Drops active connections unnecessarily | Use graceful reload instead |
| Not checking error log after restart | Broken config silently loaded | Always check /usr/local/lsws/logs/error.log |
| Restarting before saving config in WebAdmin | Old config reloads | Click Save in WebAdmin before restarting |
| Forgetting to test after restart | Broken site goes unnoticed | Verify with curl or browser |
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
- Continue to Configuration Testing to learn how to validate changes before reloading.