Senior
You have been given a server where Nginx is crashing. Where will you start?
sobes.tech AI
Answer from AI
First, gather information about the problem:
- Check Nginx logs — usually error.log and access.log, they will give clues about the causes of the crash.
- Check the service status:
systemctl status nginxorservice nginx status. - Verify if configuration files have been recently changed — you can run
nginx -tto check syntax. - Assess server load: CPU, memory, disk space — the crash may be related to resources.
- If there is a core dump or crash log, analyze them.
- Try restarting the service and see if the error recurs.
Thus, diagnostics start with analyzing logs and service status, then check configuration and system resources.