Skip to main content
VPS NEPALby NepalCloud Host
PricingAbout
Client area Explore VPS plans
View VPS plansCompare pricing
VPS hosting
All VPS plansSmall VPS · from NPR 2,999/yearUbuntu VPSWindows VPSOperating systems
Solutions
Application hostingn8n automationDatabase VPSDevelopment VPSWeb hostingDomainsDedicated servers
Resources
DocumentationConnect over SSHGuides & articlesFAQsSupportContact
About VPS NepalContact supportOpen client area
Support

Troubleshooting

Common VPS issues and their solutions. Learn to troubleshoot connectivity, performance, security, and application problems with step-by-step guides.

Prerequisites
  • Basic Linux command line knowledge
  • Access to VPS (physical or remote)
  • Understanding of your system configuration
  • Backup of important data (recommended)
  • Patience and systematic approach to problem-solving
SSH Connection Issues

SSH connection problems are among the most common issues VPS users face. Most problems can be resolved with systematic troubleshooting.

Common SSH Issues:

  • Connection refused or timeout
  • Permission denied errors
  • Host key verification failed
  • SSH service not running
  • Firewall blocking connections
# Check SSH service status
sudo systemctl status sshd
sudo systemctl is-enabled sshd

# Check SSH port
sudo netstat -tlnp | grep :22
sudo ss -tlnp | grep :22

# Test SSH from localhost
ssh localhost

# Check SSH configuration
sudo sshd -t

# Check firewall rules
sudo ufw status
sudo iptables -L

# Check SSH logs
sudo tail -f /var/log/auth.log
sudo tail -f /var/log/secure

# Test connection with verbose output
ssh -v user@your-server-ip

# Clear known hosts if host key changed
ssh-keygen -R your-server-ip

# Check DNS resolution
nslookup your-server-ip
dig your-server-ip
Service Startup Problems

Services failing to start or restart can prevent applications from working properly. Common issues include configuration errors, dependency problems, and permission issues.

Common Service Issues:

  • Configuration syntax errors
  • Missing dependencies
  • Permission problems
  • Port conflicts
  • Resource limitations
# Check service status
sudo systemctl status apache2
sudo systemctl status nginx
sudo systemctl status mysql

# Check service logs
sudo journalctl -u apache2 -n 50
sudo journalctl -u nginx -f
sudo journalctl -u mysql --since "1 hour ago"

# Test configuration files
sudo apache2ctl configtest
sudo nginx -t
sudo mysqld --help | head -10

# Check for port conflicts
sudo netstat -tlnp | grep :80
sudo netstat -tlnp | grep :443
sudo lsof -i :3306

# Check disk space
df -h
du -sh /var/log/*

# Check memory usage
free -h
ps aux --sort=-%mem | head -10

# Restart services
sudo systemctl restart apache2
sudo systemctl restart nginx
sudo systemctl restart mysql
Performance Issues

Slow performance can be caused by various factors including resource constraints, misconfigurations, and application issues.

Performance Problem Causes:

  • High CPU usage
  • Memory exhaustion
  • Disk I/O bottlenecks
  • Network congestion
  • Misconfigured applications
# Monitor system resources
top
htop
free -h

# Check CPU usage
mpstat 1
sar -u 1 5

# Check memory usage
vmstat 1
cat /proc/meminfo

# Check disk I/O
iostat -x 1
iotop

# Check network usage
ifstat 1
nload

# Check swap usage
swapon -s
cat /proc/swaps

# Check load average
uptime
cat /proc/loadavg

# Monitor specific processes
ps aux | grep apache
ps aux | grep mysql
ps aux | grep nginx

# Check system limits
ulimit -a
cat /etc/security/limits.conf
Database Connection Issues

Database connection problems can prevent applications from accessing data. Issues often involve authentication, network connectivity, or resource limitations.

Database Connection Problems:

  • Authentication failures
  • Connection limits exceeded
  • Network connectivity issues
  • Configuration errors
  • Resource exhaustion
# Test database connections
# MySQL/MariaDB
mysql -u root -p -e "SELECT VERSION();"
mysql -u username -p database_name -e "SELECT 1;"

# PostgreSQL
psql -U username -d database_name -h localhost -c "SELECT version();"

# MongoDB
mongosh --eval "db.stats()"

# Check database service status
sudo systemctl status mysql
sudo systemctl status postgresql
sudo systemctl status mongod

# Check database logs
sudo tail -f /var/log/mysql/error.log
sudo tail -f /var/log/postgresql/postgresql-12-main.log
sudo tail -f /var/log/mongodb/mongod.log

# Check connection limits
# MySQL
mysql -u root -p -e "SHOW VARIABLES LIKE 'max_connections';"
mysql -u root -p -e "SHOW PROCESSLIST;"

# PostgreSQL
psql -U postgres -c "SHOW max_connections;"
psql -U postgres -c "SELECT * FROM pg_stat_activity;"

# Check network connectivity to database
telnet localhost 3306
telnet localhost 5432
telnet localhost 27017
Web Server Problems

Web server issues can result in websites being unavailable or slow to respond. Common problems include configuration errors, resource limitations, and security issues.

Web Server Issues:

  • Configuration syntax errors
  • Permission problems
  • Resource exhaustion
  • SSL/TLS configuration issues
  • PHP-FPM problems
# Test web server configuration
sudo apache2ctl configtest
sudo nginx -t

# Check web server status
sudo systemctl status apache2
sudo systemctl status nginx

# Check web server logs
sudo tail -f /var/log/apache2/error.log
sudo tail -f /var/log/apache2/access.log
sudo tail -f /var/log/nginx/error.log
sudo tail -f /var/log/nginx/access.log

# Check PHP-FPM status (if using PHP)
sudo systemctl status php7.4-fpm
sudo tail -f /var/log/php7.4-fpm.log

# Test web server response
curl -I http://localhost
curl -I https://localhost

# Check SSL certificate
openssl s_client -connect localhost:443 -servername localhost

# Check file permissions
ls -la /var/www/html/
sudo find /var/www -type f -name "*.php" -exec ls -la {} ;

# Check disk space for web files
du -sh /var/www/*
df -h /var/www

# Restart web services
sudo systemctl restart apache2
sudo systemctl restart nginx
sudo systemctl restart php7.4-fpm
Network & Connectivity Issues

Network problems can affect connectivity to your VPS and between services. Issues may involve DNS, routing, firewall rules, or network interface configuration.

Network Problem Types:

  • DNS resolution failures
  • Routing problems
  • Firewall blocking traffic
  • Network interface issues
  • Bandwidth exhaustion
# Check network interfaces
ip addr show
ifconfig -a

# Test network connectivity
ping -c 4 google.com
ping -c 4 8.8.8.8

# Check DNS resolution
nslookup google.com
dig google.com

# Check routing table
ip route show
route -n

# Check firewall rules
sudo ufw status
sudo iptables -L -n -v

# Check network services
sudo netstat -tlnp
sudo ss -tlnp

# Monitor network traffic
sudo iftop
sudo nload

# Check network configuration files
cat /etc/resolv.conf
cat /etc/hosts
cat /etc/network/interfaces

# Test specific ports
telnet localhost 80
telnet localhost 443
telnet localhost 22

# Check bandwidth usage
vnstat
iftop
Security Incident Response

If you suspect a security incident, it's important to respond quickly and systematically to contain the damage and prevent further compromise.

Security Incident Steps:

  • Isolate affected systems
  • Preserve evidence
  • Assess the damage
  • Remove malicious content
  • Strengthen security
# Check for suspicious processes
ps aux | grep -v root | head -20
ps aux --forest

# Check for unusual network connections
netstat -antp | grep ESTABLISHED
ss -antp | grep ESTABLISHED

# Check system logs for suspicious activity
sudo grep "Failed password" /var/log/auth.log
sudo grep "Invalid user" /var/log/auth.log

# Check for unauthorized users
cat /etc/passwd | grep -v nologin | grep -v false | grep -v sync
awk -F: '($3 >= 1000) {print $1}' /etc/passwd

# Check for world-writable files
find / -type f -perm -o+w ! -path "/proc/*" 2>/dev/null | head -20

# Check for hidden files in user directories
find /home -name ".*" -type f | head -20

# Check cron jobs for suspicious entries
crontab -l
ls -la /etc/cron.*

# Scan for rootkits
sudo rkhunter --check
sudo chkrootkit

# Check file integrity
sudo aide --check

# Backup important logs before analysis
sudo cp /var/log/auth.log /var/log/auth.log.backup
sudo cp /var/log/syslog /var/log/syslog.backup
System Recovery Procedures

When systems become unresponsive or severely compromised, you may need to perform recovery procedures to restore normal operation.

Recovery Scenarios:

  • Boot failures
  • Filesystem corruption
  • Severe security incidents
  • Configuration disasters
  • Hardware failures
# Boot into recovery mode
# At GRUB menu, select Advanced Options
# Choose recovery mode kernel

# Mount filesystem in recovery mode
mount -o remount,rw /
mount -a

# Check filesystem integrity
sudo fsck /dev/sda1
sudo e2fsck -f /dev/sda1

# Repair package database
sudo dpkg --configure -a
sudo apt install -f

# Restore from backup
sudo tar -xzf /backups/system_backup.tar.gz -C /

# Reset root password (if locked out)
# Boot into recovery mode
mount -o remount,rw /
passwd root

# Check system logs for errors
sudo journalctl -p err --since "1 day ago"

# Verify system services
sudo systemctl list-units --failed
sudo systemctl reset-failed

# Clean up temporary files
sudo find /tmp -type f -mtime +7 -delete
sudo find /var/tmp -type f -mtime +7 -delete

# Reboot system
sudo reboot
Contents
SSH Connection IssuesService Startup ProblemsPerformance IssuesDatabase Connection IssuesWeb Server ProblemsNetwork & Connectivity IssuesSecurity Incident ResponseSystem Recovery Procedures
Related Docs

Monitoring Tools

Set up monitoring to detect issues early

Security Hardening

Prevent security issues with proper hardening

Backup & Restore

Recover from issues using backups

Need Help?

Can't find what you're looking for? Our support team is here to help.

VPS NEPAL

Clear VPS pricing, capable infrastructure and practical support for people building on the web in Nepal.

A service by NepalCloud Host PVT. LTD.

support@nepalcloud.host Kathmandu, Nepal

Hosting

  • VPS hosting plans
  • Small VPS
  • Windows VPS
  • Ubuntu VPS
  • Web hosting
  • Domain registration

Resources

  • Documentation
  • Guides & articles
  • Support centre
  • Frequently asked questions
  • Contact

Legal

  • Privacy Policy
  • Terms of Service
  • Acceptable Use Policy
  • Fair Use Policy
  • Refund Policy

© 2026 NepalCloud Host PVT. LTD. All rights reserved.

Client portal