How Do I Handle Unexpected Restarts?
Possible Cause 1: Out of Memory (OOM)
- Symptom
One or more processes used up all physical memory and swap space. To prevent a system hang, the kernel's OOM Killer forcibly terminates the process that occupies the most memory. This may cause a chain reaction and the system restarts.
- Check method
Check whether the /var/log/messages file contains keywords like "Out of memory: Killed process" or "invoked oom-killer".
- Solution
- Check service processes to see if there is memory leak, which causes OOM.
- If more memory is required by services, upgrade the ECS memory specifications.
Possible Cause 2: Kernel Panic
- Symptom
The kernel detects a severe, unrecoverable error (such as a driver bug, kernel bug, and hardware communication problem). The system will be frozen and may be automatically restarted.
- Check method
- Check whether the /var/log/messages file contains keywords like "Kernel panic - not syncing" and "Oops".
- Check the automatic restart settings.
cat /proc/sys/kernel/panic # If the output is 0, the system is suspended after a panic occurs and waits for manual processing. # If the output is N, the system automatically restarts N seconds after a panic occurs.
- Solution
- Roll back the kernel or drivers. If the problem occurs after a recent update, roll back the kernel or related drivers (such as graphics and network drivers) to the previous stable version.
- Capture onsite information. To preserve the scene if the fault occurs again, you can temporarily disable automatic restart.
echo 0 > /proc/sys/kernel/panic # Temporarily disabling automatic restart
Possible Cause 3: Scheduled Restart
- Symptom
- Check method
sudo grep -r "reboot\|shutdown" /etc/cron.d/ /etc/cron.hourly/ /etc/cron.daily/ /etc/cron.weekly/ /etc/cron.monthly/ /var/spool/cron/
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot