Quick Reference

Error Database Connection Lost
Severity Critical
Component Database

Database Connection Lost

Stuck on Database Connection Lost? Message us. 300 call centers built.Your dialer, tuned by us.
Message us

What Causes This Error

VICIdial cannot connect to the MySQL/MariaDB database. This causes complete system failure — no calls can be placed, no leads can be loaded, and agents cannot log in. Causes include: MySQL service stopped, connection pool exhausted, database server out of disk space, MySQL max_connections limit reached, or network issue between VICIdial and remote database server.

How to Fix It

  • 1 Check MySQL status: sudo systemctl status mysql

  • 2 If stopped, check error log: sudo tail -100 /var/log/mysql/error.log

  • 3 Check disk space: df -h (MySQL stops if disk is full)

  • 4 Check connection count: mysql -e ‘SHOW STATUS LIKE “Threads_connected”’

  • 5 If connection limit reached, increase: mysql -e ‘SET GLOBAL max_connections = 500’

  • 6 Restart MySQL if crashed: sudo systemctl restart mysql

  • 7 Verify VICIdial can connect: mysql -u cron -ptest asterisk -e ‘SELECT COUNT(*) FROM vicidial_users LIMIT 1’

  • 8 Restart VICIdial after database recovers

How to Prevent It

Monitor MySQL disk space and connection count. Set max_connections appropriately for your agent count. Implement automated database backup and monitoring. Consider MySQL replication for high-availability operations. Monitor slow query log to prevent query storms from exhausting connections.

ViciStack’s free 30-day support plan includes unlimited live VICIdial troubleshooting. If you can’t resolve this error with the steps above, our engineers will connect to your system and fix it directly — no support tickets, no hourly billing.

Frequently Asked Questions

What causes the VICIdial "Database Connection Lost" error? +

VICIdial cannot connect to the MySQL/MariaDB database. This causes complete system failure -- no calls can be placed, no leads can be loaded, and agents cannot log in. Causes include: MySQL service stopped, connection pool exhausted, database server out of disk space, MySQL max_connections limit reached, or network issue between VICIdial and remote database server.

How do I fix the VICIdial "Database Connection Lost" error? +

Check MySQL status: sudo systemctl status mysql Then: If stopped, check error log: sudo tail -100 /var/log/mysql/error.log Then: Check disk space: df -h (MySQL stops if disk is full) Then: Check connection count: mysql -e 'SHOW STATUS LIKE "Threads_connected"' Then: If connection limit reached, increase: mysql -e 'SET GLOBAL max_connections = 500' Then: Restart MySQL if crashed: sudo systemctl restart mysql Then: Verify VICIdial can connect: mysql -u cron -ptest asterisk -e 'SELECT COUNT(*) FROM vicidial_users LIMIT 1' Then: Restart VICIdial after database recovers

How can I prevent the "Database Connection Lost" error in VICIdial? +

Monitor MySQL disk space and connection count. Set max_connections appropriately for your agent count. Implement automated database backup and monitoring. Consider MySQL replication for high-availability operations. Monitor slow query log to prevent query storms from exhausting connections.

Related Errors

Asterisk Not Running View error → VICIdial Process Not Running View error → Report Timeout View error →

Part of the Complete VICIdial Implementation Guide

Fixed? Good. Next: make the dialer pay.

We aim to double your conversion rate in 30 days.

In writing: 50% more conversions in 30 days, or we work for free.

Measured on your own conversion rate against your last 30 days before we start. If the target is missed, there is no management fee until we hit it. The setup fee still applies.

  • 300 call centers built
  • 4.7 stars from 41 Google reviews
  • Keep your dialer
Message us

Tell us how many agents you run and what you sell. That is all we need to start.

Goal: double your conversion rate in 30 days.Your dialer, tuned by us.
Message us