[Asterisk-Users] Better solution to mysql reconnect timeout

Matt Riddell (IT) matt.riddell at sineapps.com
Wed Jan 11 08:09:07 MST 2006


Sig Lange wrote:
> vmail*CLI> realtime mysql status
> Jan 11 09:53:04 ERROR[3597]: res_config_mysql.c:623 mysql_reconnect: MySQL
> RealTime: Failed to reconnect. Check debug for more info.
> vmail*CLI> realtime mysql status
> Connected to asterisk_vm at tritonvoice.com, port 3306 with username voicemail
> for 1 days, 5 hours, 32 minutes, 7 seconds.
> vmail*CLI> realtime mysql status
> Connected to asterisk_vm at tritonvoice.com, port 3306 with username voicemail
> for 0 seconds.
> 
> -----
> 
> There seems to be a problem with the way mysql is reconnected, apparantly it
> seems to be calling mysql_reconnect() but I find that hard to believe since
> it doesn't connect. Then the second time I run the command, it says it's
> been connected for 1 days, 5 hours, etc. That doesn't make any sense since
> the connection already failed to reconnect. There is no connection. Running
> the command again assures in fact, finally I do have a connection. My
> particular purpose is a voicemail system, which isn't taking voicemail
> messages all the time, it is important the system always be connected to
> mysql.

Have you had a look at the source?

Sounds like the connection stats are not refreshed on a reconnect.

If you are not versed in C, you can still just look through the source 
at the plaintext and comments.

-- 
Cheers,

Matt Riddell
_______________________________________________

http://www.sineapps.com/news.php (Daily Asterisk News - html)
http://freevoip.gedameurope.com (Free Asterisk Voip Community)
http://www.sineapps.com/rssfeed.php (Daily Asterisk News - rss)



More information about the asterisk-users mailing list