Knowledgebase

Restarting Services Safely Print

  • vpsservermanagement, errors, database, troubleshooting, downtime, guide, howto, solution
  • 0

Knowing what a restart does before you do it.

RELOAD VERSUS RESTART

Reload re-reads configuration without dropping existing connections, where supported. Prefer it on a live site.

Restart stops and starts, dropping connections. Necessary for some changes.

TEST FIRST

Web servers and most major services offer a configuration test command. Run it before reloading or restarting.

A restart with broken configuration means the service does not come back, and the site is down until you find the error.

THE ORDER OF DEPENDENCIES

Some services depend on others. Restarting a database while applications are connected causes errors in those applications, which may need their own restart afterwards.

WHEN A SERVICE WILL NOT START

Check systemctl status, which usually names the problem Check the service's error log Check whether another process is holding the port Check whether a configuration file has a syntax error

WHAT NOT TO DO

Restarting repeatedly in the hope that it works. Read the error instead.

REBOOTING

Necessary after kernel updates. Schedule it, and confirm all services come back afterwards.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot