Junior — Middle
What to do if the service reports disk space exhaustion and stops working?
sobes.tech AI
Answer from AI
If the service reports disk space exhaustion and stops working, the following steps should be taken:
-
Check the current disk status: using commands like
df -h(Linux) or viewing disk properties (Windows) to determine which partition is full. -
Free up space:
- Delete unnecessary files, logs, or temporary data.
- Clear application caches.
- Move large files to another storage device.
-
Check log rotation settings: ensure that logs are not accumulating uncontrollably.
-
Restart the service: after freeing up space, the service should start normally.
-
Set up monitoring: to receive early warnings about disk space filling up and avoid similar situations in the future.
Example command to clear logs in Linux:
sudo journalctl --vacuum-size=100M
This limits the size of system logs to 100 MB.