Появилась проблема, которой раньше не было. Быть может подскажете решение проблемы или хотя бы причину падения соединения.
Периодически пропадает соединение с базой.
После этого астериск не может нормально функционировать, так как в базе все: cdr, peers, extensions.
В логах астериска:
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER:
[Mar 27 18:49:46] WARNING[13692] res_odbc.c: SQL Execute returned an error -1: HY000: [MySQL][ODBC 5.1 Driver][mysqld-5.1.66]Query execution was interrupted (70)
[Mar 27 18:49:46] WARNING[13692] res_odbc.c: SQL Execute error -1! Verifying connection to cdr [cdr-connector]...
[Mar 27 18:49:46] WARNING[13692] res_odbc.c: Connection is down attempting to reconnect...
[Mar 27 18:49:46] DEBUG[13692] res_odbc.c: Disconnected 0 from cdr [cdr-connector]
[Mar 27 18:49:46] DEBUG[13692] res_odbc.c: Database handle 0x7fbe4c00bee0 deallocated
[Mar 27 18:49:46] NOTICE[13692] res_odbc.c: Connecting cdr
[Mar 27 18:49:46] WARNING[13692] res_odbc.c: res_odbc: Error SQLConnect=-1 errno=2013 [unixODBC][MySQL][ODBC 5.1 Driver]Lost connection to MySQL server at 'reading initial communication
[Mar 27 18:49:46] WARNING[12550] res_odbc.c: SetConnectAttr (Txn isolation) returned an error: HY000: [MySQL][ODBC 5.1 Driver]MySQL server has gone away
[Mar 27 18:49:46] WARNING[12550] res_odbc.c: SQL Execute returned an error -1: 08S01: [MySQL][ODBC 5.1 Driver][mysqld-5.1.66]MySQL server has gone away (65)
[Mar 27 18:49:46] WARNING[12550] res_odbc.c: SQL Execute error -1! Verifying connection to proxy [proxy-connector]...
[Mar 27 18:49:46] WARNING[12550] res_odbc.c: Connection is down attempting to reconnect...
[Mar 27 18:49:46] DEBUG[12550] res_odbc.c: Disconnected 0 from proxy [proxy-connector]
[Mar 27 18:49:46] DEBUG[12550] res_odbc.c: Database handle 0x7fbe7426dd10 deallocated
[Mar 27 18:49:46] NOTICE[12550] res_odbc.c: Connecting proxy
[Mar 27 18:49:46] WARNING[12550] res_odbc.c: res_odbc: Error SQLConnect=-1 errno=2013 [unixODBC][MySQL][ODBC 5.1 Driver]Lost connection to MySQL server at 'reading initial communication
[Mar 27 18:49:46] WARNING[12550] res_odbc.c: SetConnectAttr (Txn isolation) returned an error: HY000: [MySQL][ODBC 5.1 Driver]MySQL server has gone away
[Mar 27 18:49:46] WARNING[12550] res_odbc.c: SQL Execute returned an error -1: 08S01: [MySQL][ODBC 5.1 Driver][mysqld-5.1.66]MySQL server has gone away (65)
[Mar 27 18:49:46] WARNING[12550] res_odbc.c: SQL Execute error -1! Verifying connection to asterisk [asterisk-connector]...
[Mar 27 18:49:46] WARNING[12550] res_odbc.c: Connection is down attempting to reconnect...
[Mar 27 18:49:46] DEBUG[12550] res_odbc.c: Disconnected 0 from asterisk [asterisk-connector]
[Mar 27 18:49:46] DEBUG[12550] res_odbc.c: Database handle 0x7fbe742c7610 deallocated
[Mar 27 18:49:46] NOTICE[12550] res_odbc.c: Connecting asterisk
[Mar 27 18:49:46] WARNING[12550] res_odbc.c: res_odbc: Error SQLConnect=-1 errno=2013 [unixODBC][MySQL][ODBC 5.1 Driver]Lost connection to MySQL server at 'reading initial communication
[Mar 27 18:49:46] WARNING[12550] res_config_odbc.c: SQL Alloc Handle failed!
[Mar 27 18:49:46] WARNING[12550] res_odbc.c: Connection is down attempting to reconnect...
[Mar 27 18:49:46] NOTICE[12550] res_odbc.c: Connecting proxy
[Mar 27 18:49:46] WARNING[12550] res_odbc.c: res_odbc: Error SQLConnect=-1 errno=2013 [unixODBC][MySQL][ODBC 5.1 Driver]Lost connection to MySQL server at 'reading initial communication
[Mar 27 18:49:46] WARNING[13692] res_odbc.c: SQL Execute error -1! Verifying connection to cdr [cdr-connector]...
[Mar 27 18:49:46] WARNING[13692] res_odbc.c: Connection is down attempting to reconnect...
[Mar 27 18:49:46] DEBUG[13692] res_odbc.c: Disconnected 0 from cdr [cdr-connector]
[Mar 27 18:49:46] DEBUG[13692] res_odbc.c: Database handle 0x7fbe4c00bee0 deallocated
[Mar 27 18:49:46] NOTICE[13692] res_odbc.c: Connecting cdr
[Mar 27 18:49:46] WARNING[13692] res_odbc.c: res_odbc: Error SQLConnect=-1 errno=2013 [unixODBC][MySQL][ODBC 5.1 Driver]Lost connection to MySQL server at 'reading initial communication
[Mar 27 18:49:46] WARNING[12550] res_odbc.c: SetConnectAttr (Txn isolation) returned an error: HY000: [MySQL][ODBC 5.1 Driver]MySQL server has gone away
[Mar 27 18:49:46] WARNING[12550] res_odbc.c: SQL Execute returned an error -1: 08S01: [MySQL][ODBC 5.1 Driver][mysqld-5.1.66]MySQL server has gone away (65)
[Mar 27 18:49:46] WARNING[12550] res_odbc.c: SQL Execute error -1! Verifying connection to proxy [proxy-connector]...
[Mar 27 18:49:46] WARNING[12550] res_odbc.c: Connection is down attempting to reconnect...
[Mar 27 18:49:46] DEBUG[12550] res_odbc.c: Disconnected 0 from proxy [proxy-connector]
[Mar 27 18:49:46] DEBUG[12550] res_odbc.c: Database handle 0x7fbe7426dd10 deallocated
[Mar 27 18:49:46] NOTICE[12550] res_odbc.c: Connecting proxy
[Mar 27 18:49:46] WARNING[12550] res_odbc.c: res_odbc: Error SQLConnect=-1 errno=2013 [unixODBC][MySQL][ODBC 5.1 Driver]Lost connection to MySQL server at 'reading initial communication
[Mar 27 18:49:46] WARNING[12550] res_odbc.c: SetConnectAttr (Txn isolation) returned an error: HY000: [MySQL][ODBC 5.1 Driver]MySQL server has gone away
[Mar 27 18:49:46] WARNING[12550] res_odbc.c: SQL Execute returned an error -1: 08S01: [MySQL][ODBC 5.1 Driver][mysqld-5.1.66]MySQL server has gone away (65)
[Mar 27 18:49:46] WARNING[12550] res_odbc.c: SQL Execute error -1! Verifying connection to asterisk [asterisk-connector]...
[Mar 27 18:49:46] WARNING[12550] res_odbc.c: Connection is down attempting to reconnect...
[Mar 27 18:49:46] DEBUG[12550] res_odbc.c: Disconnected 0 from asterisk [asterisk-connector]
[Mar 27 18:49:46] DEBUG[12550] res_odbc.c: Database handle 0x7fbe742c7610 deallocated
[Mar 27 18:49:46] NOTICE[12550] res_odbc.c: Connecting asterisk
[Mar 27 18:49:46] WARNING[12550] res_odbc.c: res_odbc: Error SQLConnect=-1 errno=2013 [unixODBC][MySQL][ODBC 5.1 Driver]Lost connection to MySQL server at 'reading initial communication
[Mar 27 18:49:46] WARNING[12550] res_config_odbc.c: SQL Alloc Handle failed!
[Mar 27 18:49:46] WARNING[12550] res_odbc.c: Connection is down attempting to reconnect...
[Mar 27 18:49:46] NOTICE[12550] res_odbc.c: Connecting proxy
[Mar 27 18:49:46] WARNING[12550] res_odbc.c: res_odbc: Error SQLConnect=-1 errno=2013 [unixODBC][MySQL][ODBC 5.1 Driver]Lost connection to MySQL server at 'reading initial communication
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER:
[asterisk]
enabled => yes
dsn => asterisk-connector
pre-connect => yes
[proxy]
enabled => yes
dsn => proxy-connector
pre-connect => yes
[cdr]
enabled => yes
dsn => cdr-connector
pre-connect => yes
enabled => yes
dsn => asterisk-connector
pre-connect => yes
[proxy]
enabled => yes
dsn => proxy-connector
pre-connect => yes
[cdr]
enabled => yes
dsn => cdr-connector
pre-connect => yes
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER:
[asterisk-connector]
driver = MySQL
Database = asterisk
Server = xxx.xxx.xxx.xxx
User = #user#
Password = #password#
[proxy-connector]
driver = MySQL
Database = proxy
Server = xxx.xxx.xxx.xxx
User = #user#
Password = #password#
[cdr-connector]
driver = MySQL
Database = cdr
Server = xxx.xxx.xxx.xxx
User = #user#
Password = #password#
driver = MySQL
Database = asterisk
Server = xxx.xxx.xxx.xxx
User = #user#
Password = #password#
[proxy-connector]
driver = MySQL
Database = proxy
Server = xxx.xxx.xxx.xxx
User = #user#
Password = #password#
[cdr-connector]
driver = MySQL
Database = cdr
Server = xxx.xxx.xxx.xxx
User = #user#
Password = #password#
Asterisk 1.8.18
Mysql 5.1
CentOS 6