how to avoid and repair vicidial database crash

Avoiding Vicidial Database Crash

TOPIC: how to avoid and repair vicidial database crash

Video Tutorial Link for this Article youtube

vicidial database repair

  About ViCidial:

VICIDIAL is a software suite that is designed to interact with the Asterisk Open-Source PBX Phone system to act as a complete inbound/outbound contact center suite with inbound email support as well.


Major Components of Vicidial
asterisk
apache
Mysql/Mariadb
astguiclient


Often Vicidial Database will be crashed due to many reasons which i have detailed in this blog,
also provided the mysql command to check the crashed table, Repair the crashed tables and optimize the mysql database.


  Mysql Command to Check the crashed database.

mysqlcheck –uroot –p --check --all-databases

if you dont know the root password run the below command to use vicidial default database credentials.

mysqlcheck –ucron –p1234 --check --all-databases
or

mysqlcheck -p --check asterisk

  Mysql Command to repair the crashed database.

mysqlcheck –uroot –p --auto-repair --all-databases

if you dont know the root password run the below command to use vicidial default database credentials.

mysqlcheck –ucron –p1234 --auto-repair --all-databases
or
mysqlcheck -p --auto-repair asterisk

  Mysql Command to Optimize the database.

mysqlcheck –uroot –p --optimize --all-databases

if you dont know the root password run the below command to use vicidial default database credentials.

mysqlcheck –ucron –p1234 --optimize --all-databases
or
mysqlcheck -p --optimize asterisk

  Root Cause & Precautions

  Root Cause 1: Server Power OFF

The sudden server power off due to Electricity Power cut, will leads to vicidial database crash.


  Precautions:

Run the server with proper Power backup like UPS and generator.


 Root Cause 2:  Improper shutdown.

Improper shutdown like Pressing the Server Power button, or shutting down the server by running linux commands halt, power off, init 0, init 6, while the server is serving huge traffic, will leads to database crash.


  Precautions :

Before shutting down or restarting the server make sure you have logged out all the agents, and stopped the dialing,
Also stop uploading leads/data, and stop downloading reports from vicidial.


Best practice run shutdown -h now to shutdown as safe mode

or shutdown -r now for safe reboot.

  Root Cause 3:  Sever overload

Server overload like ,dialing more calls and logging in more agents, more than the capacity of the server will lead to the database crash.


  Precautions:

Login agents and dial according to your server capacity, use the HTOP command to monitor your server load like CPU, memory load average, accordingly, increase or decrease the agent, dialing ratio


Next set a max trunk limit, so to avoid overload because of too much of calls.


Use best in class servers
Avoid Virtualized deployment
For big call centers like 100 Plus agents use Vicidial Cluster setup.


  Root Cause 3:  insufficient Disk Space

Due to insufficient disk space,ie Disk full,  vicidial will force for database query which leads to data loss and database crash.

  Precautions:

1. Keep enough space in main partition
2. use df -h linux command to check the disk utilization
3. run scheduled cron jobs to delete old call recordings,which is not useful.
4. Archive the Recordings to a dedicated FTP server.
5. weekly delete the system logs form /var/log
6. monthly once fine tune the mysql database ,by deleting old call logs, unused objects like list, campaigns, users.

  Conclusion :

    Hope the article is usefule, it is always best practice to maintain the database with regular backups and archiving the old logs, check out the below link for mysql old logs archive
https://www.striker24x7.com/search/label/mysql
For professional support reach me at skype:striker24x7




1 Comments
  • khan
    khan January 26, 2021 at 12:41 PM

    Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed and I hope you post again soon. Big thanks for the useful info.
    asterisk pbx,

Add Comment
comment url