Any solution for ODBC disconnections?

Hi,

I have configured my Asterisk real time using ODBC. I am using MySQL as data base. I am getting these below messages on Asterisk CLI frequently and immediately my server console is disconnecting:

res_odbc.c:1412 _ast_odbc_request_obj2: SetConnectAttr (Txn isolation) returned an error: HY000: [MySQL][ODBC 5.2(w) Driver]Lost connection to MySQL server during query
[Jun 8 11:32:17] WARNING[3940][C-00000021]: res_config_odbc.c:118 custom_prepare: SQL Prepare failed![SELECT * FROM sipusers WHERE name = ? AND host = ?]
[Jun 8 11:32:17] WARNING[3940][C-00000021]: res_odbc.c:762 ast_odbc_sanity_check: Connection is down attempting to reconnect…

I searched a lot in internet and I didn’t find the solution anywhere including this Asterisk forum. Maximum users are posted this query. But, there is no solution is given.

Is there any solutions for this issue? Is it really a bug in Asterisk?

Can any body help me to solve this problem or advise?

Thanks in advance.

Chandra.

This is coming from the MySQL ODBC driver. As it states it lost the connection during the query. Why that happens is hard to answer. ODBC isn’t my thing but you may see if there’s additional logging on the MySQL server side to see if it can tell you anything.