[asterisk-users] asterisk addon mysql - is mysql connection persistent

Miguel Molina mmolina at millenium.com.co
Tue Jul 7 18:27:00 CDT 2009


Shahid Tel escribió:
> Hi Guys,
>
> As it looks like from CLI command " show cdr mysql " , can somebody 
> confirms that cdr-mysql creates persistent connection with in asterisk?
>
> " show cdr mysql " shows " connected to user at dbhost 
> <mailto:user at dbhost> from 18 hours ......."
>  
Yes, the MySQL CDR addon creates a persistent connection to the 
database. If the database server goes down, the addon tries to reconnect 
so if it succeeds no records are lost or only a few, I'm not sure. The 
addon won't die, neither asterisk. For example:

"cdr mysql status" CLI command shows me this:

Connected to <user>@<IP>, port 3306 using table <table> for 19 days, 19 
hours, 32 minutes, 2 seconds.
  Wrote 4256045 records since last restart and 294847 records since last 
reconnect.

Restart is the last asterisk restart. Last reconnect, is the last time 
the connection went down and reconnected because the server went down or 
you killed the connection from the MySQL monitor. So if for any reason 
you need to do a quick restart of MySQL, you won't lose CDR records if 
no calls are hungup during the MySQL restart cycle.

Cheers,

-- 
Ing. Miguel Molina
Grupo de Tecnología
Millenium Phone Center

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090707/1dfb8976/attachment.htm 


More information about the asterisk-users mailing list