Page 1 of 1

Congestion Probelm, Then Table Crash and Now Error

PostPosted: Thu Nov 29, 2018 12:59 am
by Sashen2137
Hi

Not sure how to post full server spec but i have a single server install for just 10 agents, have had constant congestion issues and confirmed with isp that its not at their end and this morning i ran the mysqlcheck -u root -p --auto-repair --optimize --all-databases as i do every now and then and i get the below

Repairing tables
asterisk.call_log
error : 5 when fixing table
error : 5 when trying to write buffers
Error : Error writing file '/srv/mysql/data/asterisk/call_log.MYI' (Errcode: 5 "Input/output error")
status : Operation failed


Have checked HD space and has 97% free.

VERSION: 2.14-28 BUILD: 180330-1344


Any help would be greatly appreciated.

When i run the below:

mysql asterisk -e "show table status where comment like '%crashed%' " --user=cron -p1234
+----------+--------+---------+------------+------+----------------+------------ -+-----------------+--------------+-----------+----------------+-------------+-- -----------+------------+-----------+----------+----------------+--------------- -----------------------------------------------------------------------+
| Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time | U pdate_time | Check_time | Collation | Checksum | Create_options | Comment |
+----------+--------+---------+------------+------+----------------+------------ -+-----------------+--------------+-----------+----------------+-------------+-- -----------+------------+-----------+----------+----------------+--------------- -----------------------------------------------------------------------+
| call_log | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | N ULL | NULL | NULL | NULL | NULL | Table './aster isk/call_log' is marked as crashed and last (automatic?) repair failed |
+----------+--------+---------+------------+------+----------------+------------ -+-----------------+--------------+-----------+----------------+-------------+-- -----------+------------+-----------+----------+----------------+--------------- -----------------------------------------------------------------------+

Re: Congestion Probelm, Then Table Crash and Now Error

PostPosted: Thu Nov 29, 2018 3:59 am
by Sashen2137
Truncated Table and Worked. How do i setup auto archiving from call_log to call_log_archive?

Re: Congestion Probelm, Then Table Crash and Now Error

PostPosted: Thu Nov 29, 2018 1:59 pm
by williamconley
Sashen2137 wrote:Truncated Table and Worked. How do i setup auto archiving from call_log to call_log_archive?

crontab -e has this script in it:
Code: Select all
### roll logs monthly on high-volume dialing systems
#30 1 1 * * /usr/share/astguiclient/ADMIN_archive_log_tables.pl


Execute the script manually like this to get the available options:

Code: Select all
perl /usr/share/astguiclient/ADMIN_archive_log_tables.pl --help


After you've chosen your options and edited the line in crontab -e ... remove the "#" at the front to activate it. Be sure it runs after hours to avoid impact on production.