Hello,
I noticed that sometimes I get 2 identical acc records in the database, although I get only 1 in the syslog (I use both db_flag and log_flag). Of course, the second record in the DB shouldn't be there.
There are no retransmissions of neither request nor response and only a single branch exists. How is this possible, and more importantly, how can I prevent the double records?
This is on Kamailio 1.4+svn.
Alex Hermann wrote:
I noticed that sometimes I get 2 identical acc records in the database, although I get only 1 in the syslog (I use both db_flag and log_flag). Of course, the second record in the DB shouldn't be there.
Identical as in, same method, same CSeq, same Call-ID, but different ID column?
On Monday 09 November 2009, Alex Balashov wrote:
Alex Hermann wrote:
I noticed that sometimes I get 2 identical acc records in the database, although I get only 1 in the syslog (I use both db_flag and log_flag). Of course, the second record in the DB shouldn't be there.
Identical as in, same method, same CSeq, same Call-ID, but different ID column?
Yes.
On Montag, 9. November 2009, Alex Hermann wrote:
Alex Hermann wrote:
I noticed that sometimes I get 2 identical acc records in the database, although I get only 1 in the syslog (I use both db_flag and log_flag). Of course, the second record in the DB shouldn't be there.
Identical as in, same method, same CSeq, same Call-ID, but different ID column?
Yes.
Hey Alex,
i think i also noticed something like this some time ago in our accounting, we use syslog output. I supposed that it had something to do with retransmissions, and that perhaps a really rare race condition exists somewhere in the accounting module. We take care of this in our cdr engine, so i did not debugged it further that time, as i don't had access to a sip trace showing the SIP message flow for the record(s) in question.
But if you say it has nothing to do with retransmissions, then its even more strange. How often do you observe this problem?
Regards,
Henning
I use 'acc' with DB CDR logging through db_postgres in about 90% of all projects I've ever worked on and have never seen this. It may be DB-specific.
Henning Westerholt wrote:
On Montag, 9. November 2009, Alex Hermann wrote:
Alex Hermann wrote:
I noticed that sometimes I get 2 identical acc records in the
database,
although I get only 1 in the syslog (I use both db_flag and
log_flag).
Of course, the second record in the DB shouldn't be there.
Identical as in, same method, same CSeq, same Call-ID, but different ID column?
Yes.
Hey Alex,
i think i also noticed something like this some time ago in our accounting, we use syslog output. I supposed that it had something to do with retransmissions, and that perhaps a really rare race condition exists somewhere in the accounting module. We take care of this in our cdr engine, so i did not debugged it further that time, as i don't had access to a sip trace showing the SIP message flow for the record(s) in question.
But if you say it has nothing to do with retransmissions, then its even more strange. How often do you observe this problem?
Regards,
Henning
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
Hello,
On 09.11.2009 17:20 Uhr, Henning Westerholt wrote:
On Montag, 9. November 2009, Alex Hermann wrote:
Alex Hermann wrote:
I noticed that sometimes I get 2 identical acc records in the
database,
although I get only 1 in the syslog (I use both db_flag and
log_flag).
Of course, the second record in the DB shouldn't be there.
Identical as in, same method, same CSeq, same Call-ID, but different ID column?
Yes.
Hey Alex,
i think i also noticed something like this some time ago in our accounting, we use syslog output.
do you get same situation with syslog acc? As I understood Alex got it with db accounting.
What is very strange in Alex's case is he gets it with db and not with syslog, for same event. The module calls step by step syslog and then db recording. So if there would be 2 db records, should be 2 syslog records.
Cheers, Daniel
I supposed that it had something to do with retransmissions, and that perhaps a really rare race condition exists somewhere in the accounting module. We take care of this in our cdr engine, so i did not debugged it further that time, as i don't had access to a sip trace showing the SIP message flow for the record(s) in question.
But if you say it has nothing to do with retransmissions, then its even more strange. How often do you observe this problem?
Regards,
Henning
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
Daniel-Constantin Mierla schrieb:
Hello,
On 09.11.2009 17:20 Uhr, Henning Westerholt wrote:
On Montag, 9. November 2009, Alex Hermann wrote:
Alex Hermann wrote:
I noticed that sometimes I get 2 identical acc records in the
database,
although I get only 1 in the syslog (I use both db_flag and
log_flag).
Of course, the second record in the DB shouldn't be there.
Identical as in, same method, same CSeq, same Call-ID, but different ID column?
Yes.
Hey Alex,
i think i also noticed something like this some time ago in our accounting, we use syslog output.
do you get same situation with syslog acc? As I understood Alex got it with db accounting.
What is very strange in Alex's case is he gets it with db and not with syslog, for same event. The module calls step by step syslog and then db recording. So if there would be 2 db records, should be 2 syslog records.
maybe in syslog there is something like "last message repeated 2 times"?
klaus
On 10.11.2009 11:50 Uhr, Klaus Darilion wrote:
Daniel-Constantin Mierla schrieb:
Hello,
On 09.11.2009 17:20 Uhr, Henning Westerholt wrote:
On Montag, 9. November 2009, Alex Hermann wrote:
Alex Hermann wrote:
I noticed that sometimes I get 2 identical acc records in the
database,
although I get only 1 in the syslog (I use both db_flag and
log_flag).
Of course, the second record in the DB shouldn't be there.
Identical as in, same method, same CSeq, same Call-ID, but
different
ID column?
Yes.
Hey Alex,
i think i also noticed something like this some time ago in our accounting, we use syslog output.
do you get same situation with syslog acc? As I understood Alex got it with db accounting.
What is very strange in Alex's case is he gets it with db and not with syslog, for same event. The module calls step by step syslog and then db recording. So if there would be 2 db records, should be 2 syslog records.
maybe in syslog there is something like "last message repeated 2 times"?
yes, it could be. Would be good to know if it is the case, because if yes, then might be a retransmission, a 200ok race (two answers at same time) or something inside the code ... never got it myself, though.
Cheers, Daniel
On Dienstag, 10. November 2009, Klaus Darilion wrote:
On 09.11.2009 17:20 Uhr, Henning Westerholt wrote:
On Montag, 9. November 2009, Alex Hermann wrote:
Alex Hermann wrote:
I noticed that sometimes I get 2 identical acc records in the
database,
although I get only 1 in the syslog (I use both db_flag and
log_flag).
Of course, the second record in the DB shouldn't be there.
Identical as in, same method, same CSeq, same Call-ID, but different ID column?
Yes.
Hey Alex,
i think i also noticed something like this some time ago in our accounting, we use syslog output.
do you get same situation with syslog acc? As I understood Alex got it with db accounting.
What is very strange in Alex's case is he gets it with db and not with syslog, for same event. The module calls step by step syslog and then db recording. So if there would be 2 db records, should be 2 syslog records.
maybe in syslog there is something like "last message repeated 2 times"?
Hey Klaus, hey Daniel,
i did not remember exactly, sorry. But i think i did not observed the line you mentioned, as the machine in question aggregates several syslog streams, and normally do not combine them. I'm not sure if Alex also use syslog accounting, i understand that he only observed this in the database. When i do some QA for our cdr engine again, i'll then take a closer look to the log generation.
Regards,
Henning
On Tuesday 10 November 2009, Klaus Darilion wrote:
Daniel-Constantin Mierla schrieb:
do you get same situation with syslog acc? As I understood Alex got it with db accounting.
What is very strange in Alex's case is he gets it with db and not with syslog, for same event. The module calls step by step syslog and then db recording. So if there would be 2 db records, should be 2 syslog records.
That's the strangest part. In syslog there's only 1 accounting entry. Seems like the DB module (MySQL) committed the same query twice.
maybe in syslog there is something like "last message repeated 2 times"?
Nope, there is not such a message.
Alex Hermann schrieb:
On Tuesday 10 November 2009, Klaus Darilion wrote:
Daniel-Constantin Mierla schrieb:
do you get same situation with syslog acc? As I understood Alex got it with db accounting.
What is very strange in Alex's case is he gets it with db and not with syslog, for same event. The module calls step by step syslog and then db recording. So if there would be 2 db records, should be 2 syslog records.
That's the strangest part. In syslog there's only 1 accounting entry. Seems like the DB module (MySQL) committed the same query twice.
Maybe a problem with the connection - e.g. INSERT, somehow the connection to the database fails and Kamailio reconnects and tries again?
regards klaus
maybe in syslog there is something like "last message repeated 2 times"?
Nope, there is not such a message.