Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] Help Please - Asterisk MYSQL interface seems to be eating data

Goto page Previous  1, 2
 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
bwentdg at pipeline.com
Guest





PostPosted: Tue May 06, 2008 4:31 pm    Post subject: [asterisk-users] Help Please - Asterisk MYSQL interface seem Reply with quote

Are you saying the * server does NOT TRY to re-establish the BD connection ?

Does your whole * SERVER freeze ?

If NOT, what happens to you CDR records ?

Anthony Francis wrote:
Quote:
Tilghman Lesher wrote:

Quote:
On Tuesday 06 May 2008 02:16:47 Johansson Olle E wrote:


Quote:
5 maj 2008 kl. 19.58 skrev Tilghman Lesher:


Quote:
On Monday 05 May 2008 11:24, Johansson Olle E wrote:


Quote:
5 maj 2008 kl. 17.51 skrev Tilghman Lesher:


Quote:
On Monday 05 May 2008 09:45, Johansson Olle E wrote:


Quote:
Another issue that we need to fix with the MYSQL driver is that
we're
lacking a connection pool. Everything seems to be handled over one
connection to Mysql, which causes issues.


That's not true. The MYSQL app generally uses multiple connections,
one
for each channel. The only way one might use only a single
connection is
by using a global variable to store a single connection id, but that
method
is not documented anywhere, AFAIK.


You talk about the Mysql APP, but is this the case with the Realtime
driver as well?


No, the native Realtime driver uses a single connection. The ODBC
Realtime
driver generally uses a single connection but can be configured to
use a
separate connection for each query.


So, we're back to where we started. A developer that can help us with
a connection
pool or a separate connection for each query would be a Nice Thing (TM).


What issues are you specifically seeing that merit using multiple
connections?



I can specify an issue that would merit multiple connections, if the
link to your db goes away Asterisk likes to freeze writing CDRs.
I have a few remote * servers that this happens to. My solution so far
has been to record CDR's to a local DB and then have a
perl script that attempts to move them over to my transaction DB. I
would suggest this solution to anyone who depends on their CDR records.

Back to top
stotaro at totarotechn...
Guest





PostPosted: Tue May 06, 2008 7:32 pm    Post subject: [asterisk-users] Help Please - Asterisk MYSQL interface seem Reply with quote

On Tue, May 6, 2008 at 11:42 AM, Anthony Francis <anthonyf at rockynet.com> wrote:
Quote:



Tilghman Lesher wrote:
Quote:
On Tuesday 06 May 2008 02:16:47 Johansson Olle E wrote:

Quote:
5 maj 2008 kl. 19.58 skrev Tilghman Lesher:

Quote:
On Monday 05 May 2008 11:24, Johansson Olle E wrote:

Quote:
5 maj 2008 kl. 17.51 skrev Tilghman Lesher:

Quote:
On Monday 05 May 2008 09:45, Johansson Olle E wrote:

Quote:
Another issue that we need to fix with the MYSQL driver is that
we're
lacking a connection pool. Everything seems to be handled over one
connection to Mysql, which causes issues.

That's not true. The MYSQL app generally uses multiple connections,
one
for each channel. The only way one might use only a single
connection is
by using a global variable to store a single connection id, but that
method
is not documented anywhere, AFAIK.

You talk about the Mysql APP, but is this the case with the Realtime
driver as well?

No, the native Realtime driver uses a single connection. The ODBC
Realtime
driver generally uses a single connection but can be configured to
use a
separate connection for each query.

So, we're back to where we started. A developer that can help us with
a connection
pool or a separate connection for each query would be a Nice Thing (TM).


What issues are you specifically seeing that merit using multiple
connections?


I can specify an issue that would merit multiple connections, if the
link to your db goes away Asterisk likes to freeze writing CDRs.
I have a few remote * servers that this happens to. My solution so far
has been to record CDR's to a local DB and then have a
perl script that attempts to move them over to my transaction DB. I
would suggest this solution to anyone who depends on their CDR records.

--
Thank you and have any kind of day you want,

Anthony Francis
Rockynet VOIP


I would not run MySQL on the local box. I would simple use Asterisk's
csv CDRs and then use some script to import the CSVs into a database
residing on another server using some sort of script. Depending on
your needs, you could probably run that during low call volume. I
also think that you adapt the free queue_log to database script by
Queuemetrics to do what you want on the fly.

Thanks,
Steve Totaro
Back to top
philipp.kempgen at amo...
Guest





PostPosted: Wed May 07, 2008 8:52 am    Post subject: [asterisk-users] Help Please - Asterisk MYSQL interface seem Reply with quote

Al Baker schrieb:
Quote:
Are you saying the * server does NOT TRY to re-establish the BD connection ?

The MySQL Realtime driver _does_ reconnect.
(Search for mysql_reconnect() in res_config_mysql.c)

Quote:
If NOT, what happens to you CDR records ?

Same thing with cdr_addon_mysql.c - it tries to reconnect.
When there is no connection it writes the CDRs to a file and as
soon as it successfully reconnects stores them in the database.

Regards,
Philipp Kempgen

--
amooma GmbH - Bachstr. 126 - 56566 Neuwied - http://www.amooma.de
Let's use IT to solve problems and not to create new ones.
Asterisk? -> http://www.das-asterisk-buch.de

Gesch?ftsf?hrer: Stefan Wintermeyer
Handelsregister: Neuwied B 14998
Back to top
philipp.kempgen at amo...
Guest





PostPosted: Wed May 07, 2008 9:10 am    Post subject: [asterisk-users] Help Please - Asterisk MYSQL interface seem Reply with quote

Steve Totaro schrieb:

Quote:
I would not run MySQL on the local box. I would simple use Asterisk's
csv CDRs and then use some script to import the CSVs into a database
residing on another server using some sort of script. Depending on
your needs, you could probably run that during low call volume. I
also think that you adapt the free queue_log to database script by
Queuemetrics to do what you want on the fly.

We're using a custom script for the queue_log -> db import
in Gemeinschaft as well. But I'm not really happy with that.
You need to run such a script at least once a minute to get
real-time statistics for the GUI etc. Everything could be
much nicer if Asterisk wrote the queue log into the database
directly.
As an alternative solution you can use a named pipe. But
Asterisk is not prepared to handle the broken pipe error
which occurs if your script should ever fail to read from
the pipe.

Regards,
Philipp Kempgen

--
amooma GmbH - Bachstr. 126 - 56566 Neuwied - http://www.amooma.de
Let's use IT to solve problems and not to create new ones.
Asterisk? -> http://www.das-asterisk-buch.de

Gesch?ftsf?hrer: Stefan Wintermeyer
Handelsregister: Neuwied B 14998
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services