ARTICLE

DMIT Troubleshooting: SSH, Web, DB, Network and OOM

Troubleshooting flows by problem type: SSH, 502/504/403, database, disk, network and memory issues.

Systematic troubleshooting

When your DMIT cloud server has issues, a systematic approach beats random guessing. This article provides troubleshooting flows for common problem types to help you locate and fix issues quickly.

Core principle: check logs first, then resources, then config.

SSH connection issues

Can't SSH in

# 1. Check network reachability
ping <server_ip>

# 2. Check if port is open
nc -zv <server_ip> 22

# 3. If port unreachable, use DMIT panel VNC/Console
# 4. Check SSH service
systemctl status sshd

# 5. Check SSH config
grep -E "Port|PermitRootLogin|PasswordAuthentication" /etc/ssh/sshd_config

# 6. Check firewall
iptables -L -n | grep 22
ufw status

# 7. Check SSH logs
journalctl -u sshd --since "1 hour ago" -n 50

Common causes: firewall rule changes, SSH port changed but not allowed in firewall, key config errors.

Slow SSH login

# Common cause: DNS reverse lookup timeout
# Edit /etc/ssh/sshd_config
UseDNS no
GSSAPIAuthentication no
systemctl restart sshd

Web service issues

502 Bad Gateway

# 1. Check backend service
systemctl status your-app
ps aux | grep your-app

# 2. Check backend port
ss -tlnp | grep :3000

# 3. Check Nginx error log
tail -20 /var/log/nginx/error.log

# 4. Test backend manually
curl -I http://127.0.0.1:3000

# 5. Check Nginx upstream config
grep -A5 "upstream" /etc/nginx/sites-enabled/*

504 Gateway Timeout

# Increase Nginx timeouts
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;

# Or optimise backend speed
# Check for infinite loops or slow queries

403 Forbidden

# Check permissions
ls -la /var/www/
chown -R www-data:www-data /var/www/
find /var/www/ -type d -exec chmod 755 {} \;
find /var/www/ -type f -exec chmod 644 {} \;

# Check Nginx deny directives
grep -r "deny" /etc/nginx/

Database issues

Connection limit reached

# MySQL
mysql -e "SHOW VARIABLES LIKE 'max_connections'"
mysql -e "SHOW STATUS LIKE 'Threads_connected'"
mysql -e "SHOW PROCESSLIST" | awk '{print $3}' | sort | uniq -c | sort -rn

# PostgreSQL
psql -c "SELECT count(*) FROM pg_stat_activity"
psql -c "SELECT state, count(*) FROM pg_stat_activity GROUP BY state"

Slow queries

# MySQL slow query log
SET GLOBAL slow_query_log = 'ON';
SET GLOBAL long_query_time = 1;
tail -20 /var/log/mysql/slow.log

# PostgreSQL
# postgresql.conf: log_min_duration_statement = 1000
EXPLAIN ANALYZE SELECT ...;

Disk issues

Disk full

df -h
du -sh /* 2>/dev/null | sort -rh | head -10

# Clean common space hogs
journalctl --vacuum-size=500M
apt clean
find /var/log -name "*.gz" -mtime +30 -delete

Inode exhaustion

df -i
find / -xdev -type f | cut -d/ -f2 | sort | uniq -c | sort -rn | head

Network issues

Service unreachable from outside

# 1. Check if service listens on 0.0.0.0 (not just 127.0.0.1)
ss -tlnp | grep :80

# 2. Check firewall
ufw status
iptables -L -n

# 3. Test from outside
curl -I http://<server_ip>:80

DNS resolution failure

cat /etc/resolv.conf
nslookup example.com
dig example.com

# Temporary fix with public DNS
echo "nameserver 8.8.8.8" > /etc/resolv.conf

Performance issues

System sluggish

top -b -n1 | head -5
top -b -n1 | grep "%Cpu" | awk '{print "I/O wait: " $8}'
ps aux --sort=-%cpu | head -5
ps aux --sort=-%mem | head -5

For performance tuning methods, see Performance Tuning Guide.

OOM (out of memory)

dmesg | grep -i "out of memory"
dmesg | grep -i "oom killer"
journalctl --since "1 hour ago" | grep -i "killed process"

# Fix: add swap
fallocate -l 2G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile

# Or: optimise app memory, or upgrade plan

Troubleshooting checklist

ProblemFirst stepKey command
SSH unreachableping + ncsystemctl status sshd
502Check backendss -tlnp + nginx error log
504Check backend response timenginx error log + backend log
403Check permissionsls -la + chown/chmod
DB conn limitCheck connectionsSHOW PROCESSLIST / pg_stat_activity
Disk fulldf -hdu -sh + clean logs/cache
Service unreachableCheck listen + firewallss -tlnp + ufw status
OOMdmesg grep oomAdd swap or upgrade
Sluggishtopps aux --sort=-%cpu

Related: SSH Hardening, IPv6 Setup Guide, Monitoring and Backup, First Deploy Checklist.

Checked 2026-08-18. Commands depend on your OS version.

NEXT STEP

Ready to pick your DMIT plan?

Filter the official snapshot by budget and network, or check live stock at DMIT.

Disclosure: purchases through this link may earn the referrer a commission at no extra cost to you.