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
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
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
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
mysqlcheck -p --optimize asterisk
Root Cause & Precautions
The sudden server power off due to Electricity Power cut, will leads to vicidial database crash.
Run the server with proper Power backup like UPS and generator.
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.
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
Server overload like ,dialing more calls and logging in more agents, more than the capacity of the server will lead to the database crash.
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.
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 archivehttps://www.striker24x7.com/search/label/mysqlFor professional support reach me at skype:striker24x7
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,