Scenario
A microservice application runs on a 4-core, 8GB Linux server with Nginx and Node.js. Suddenly, monitoring alerts show a spike in HTTP 502 errors, and users cannot access the service.
Symptoms
- Load average >10 (normal <2)
- I/O wait >30%
- Slow SSH response
- dmesg showing multiple "hung_task_timeout_secs" errors
Diagnosis Steps
-
Check system load
bash uptime top -bn1 | head -5Output: load average: 12.5, 10.3, 8.7. -
Identify high resource processes
bash ps aux --sort=-%cpu | head -10 ps aux --sort=-%mem | head -10Nginx worker processes consuming 300% CPU (likely infinite loop). -
Analyze I/O bottleneck
bash iostat -x 1 3%util near 100%, await >100ms — disk performance issue. -
Check disk space and inodes
bash df -h / df -i /Disk usage 85%, inodes normal, but log files growing rapidly. -
Review system logs
bash tail -100 /var/log/messages | grep -i errorFound: "EXT4-fs error: journal has aborted". -
Check filesystem consistency
bash touch /test && sync && rm /test # test writeIf fails, schedule fsck during maintenance window; be cautious.
Risk Controls
- Avoid fsck during peak hours: risk of data loss.
- Attempt read-only remount first:
bash mount -o remount,ro /dev/sda1 / - Backup critical data: use
ddorrsyncafter confirming.
Rollback Steps
If recent changes caused the issue (e.g., config update, kernel patch):
1. Rollback application:
bash
systemctl restart nginx # or load old config
2. Rollback kernel (requires reboot):
bash
grub2-set-default "CentOS Linux (3.10.0-1160.el7.x86_64) 7 (Core)"
reboot
3. If filesystem corrupted, restore from backup or use LVM snapshot.
Verification
- Confirm load normal:
uptime - Confirm I/O reduction:
iostat -x 1 2 - Confirm service health:
curl -I http://localhost/health - Check monitoring dashboard: error rate returns to 0.
When to Submit an OpsGlobal Ticket
- Troubleshooting steps fail
- Need fsck but cannot schedule downtime
- Suspected hardware failure (e.g., bad sectors)
- Kernel debugging or performance tuning required
- Need long-term root cause analysis or architecture optimization
Include with ticket:
- dmesg and /var/log/messages logs
- top and iostat output
- Change timeline
This standardized runbook enables SREs to quickly diagnose and recover production issues, and seamlessly escalate to OpsGlobal for expert support.
Use cases
Useful for teams handling DevOps issues and needing a clear troubleshooting and delivery workflow.
Problem background
A practical guide for troubleshooting production Linux servers, covering scenario, symptoms, diagnosis commands, risk controls, rollback, verification, and when to escalate to OpsGlobal.
Troubleshooting steps
Confirm impact and recent changes, collect logs, configuration and metrics, then apply fixes from low to high risk.
Command examples
Replace sample resource names with real values and store passwords, tokens and keys in environment variables.
Risks
Before production changes, confirm backups, access boundaries, change windows and rollback paths.
Rollback plan
Keep original configuration and release versions; roll back config, images or database changes if metrics degrade.
Deliverables
Root-cause notes, key commands, remediation steps, verification results and follow-up recommendations.
Need help with a similar technical issue?
If your servers, Kubernetes, Docker, CI/CD, databases or monitoring systems have similar issues, submit logs and config files for remote diagnosis.