Hi,
I have a issue with the db_cluster module. All works fine but when i enable ACC records to the database i get duplicate entry's in the acc table. I have 2 nodes enabled:
# ----- db_cluster params ----- modparam("db_cluster", "connection", "con1=>mysql://kamailio:password@10.1.1.1/kamailio") modparam("db_cluster", "connection", "con2=>mysql://kamailio:password@10.1.1.2/kamailio")
modparam("db_cluster", "cluster", "cls1=>con1=9s8p;con2=9s8p")
When i remove one node from the pool the acc records look fine. Could this be a bug? Or should i bypass the db_cluster for accounting?
I'm running kamailio 4.4.2.
Thanks,
Jan Hazenberg
Hi,
please check your cluster definition: You requested parallel operations "8p" on the the connection, so it will write into con1 AND con2. What did you expect? ;-)
"Command mode is a character among s, r and p. s is for doing serial operations (try first and if fails, try next); r is for doing round robin operations; p - is for doing parallel operations (this is valid only for write operations)." http://www.kamailio.org/docs/modules/devel/modules/db_cluster#db_cluster.p.c...
Thanks, Carsten
2016-08-09 9:54 GMT+02:00 Jan Hazenberg jenus@cyberchaos.nl:
Hi,
I have a issue with the db_cluster module. All works fine but when i enable ACC records to the database i get duplicate entry's in the acc table. I have 2 nodes enabled:
# ----- db_cluster params ----- modparam("db_cluster", "connection", "con1=>mysql://kamailio:password@10.1.1.1/kamailio") modparam("db_cluster", "connection", "con2=>mysql://kamailio:password@10.1.1.2/kamailio")
modparam("db_cluster", "cluster", "cls1=>con1=9s8p;con2=9s8p")
When i remove one node from the pool the acc records look fine. Could this be a bug? Or should i bypass the db_cluster for accounting?
I'm running kamailio 4.4.2.
Thanks,
Jan Hazenberg
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Carsten,
Indeed my bad, typical case of RTFM ;)
Jan
Carsten Bock schreef op 2016-08-09 10:24:
Hi,
please check your cluster definition: You requested parallel operations "8p" on the the connection, so it will write into con1 AND con2. What did you expect? ;-)
"Command mode is a character among s, r and p. s is for doing serial operations (try first and if fails, try next); r is for doing round robin operations; p - is for doing parallel operations (this is valid only for write operations)." http://www.kamailio.org/docs/modules/devel/modules/db_cluster#db_cluster.p.c... [4]
Thanks, Carsten
2016-08-09 9:54 GMT+02:00 Jan Hazenberg jenus@cyberchaos.nl:
Hi,
I have a issue with the db_cluster module. All works fine but when i enable ACC records to the database i get duplicate entry's in the acc table. I have 2 nodes enabled:
# ----- db_cluster params ----- modparam("db_cluster", "connection", "con1=>mysql://kamailio:password@10.1.1.1/kamailio [1]") modparam("db_cluster", "connection", "con2=>mysql://kamailio:password@10.1.1.2/kamailio [2]")
modparam("db_cluster", "cluster", "cls1=>con1=9s8p;con2=9s8p")
When i remove one node from the pool the acc records look fine. Could this be a bug? Or should i bypass the db_cluster for accounting?
I'm running kamailio 4.4.2.
Thanks,
Jan Hazenberg
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users [3]
--
Carsten Bock CEO (Geschäftsführer)
ng-voice GmbH Millerntorplatz 1 20359 Hamburg / Germany
http://www.ng-voice.com [5] mailto:carsten@ng-voice.com
Office +49 40 5247593-40 Fax +49 40 5247593-99
Sitz der Gesellschaft: Hamburg Registergericht: Amtsgericht Hamburg, HRB 120189 Geschäftsführer: Carsten Bock Ust-ID: DE279344284
Hier finden Sie unsere handelsrechtlichen Pflichtangaben: http://www.ng-voice.com/imprint/ [6]
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users [3]
Links: ------ [1] http://kamailio:password@10.1.1.1/kamailio [2] http://kamailio:password@10.1.1.2/kamailio [3] http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users [4] http://www.kamailio.org/docs/modules/devel/modules/db_cluster#db_cluster.p.c... [5] http://www.ng-voice.com [6] http://www.ng-voice.com/imprint/
On Tue, Aug 09, 2016 at 09:54:28AM +0200, Jan Hazenberg wrote:
Or should i bypass the db_cluster for accounting?
I'm running kamailio 4.4.2.
With using db_cluster you are missing out on the async abilities of acc: http://www.kamailio.org/docs/modules/stable/modules/acc.html#acc.p.db_insert... (unless async support was added to db_cluster in 4.4+). The reason for using async is that in the past I had kamailio crash with locks on acc preventing timely processing of requests.
Daniel,
Thanks for the info, i will keep that in mind!
Jan
Daniel Tryba schreef op 2016-08-09 11:23:
On Tue, Aug 09, 2016 at 09:54:28AM +0200, Jan Hazenberg wrote:
Or should i bypass the db_cluster for accounting?
I'm running kamailio 4.4.2.
With using db_cluster you are missing out on the async abilities of acc: http://www.kamailio.org/docs/modules/stable/modules/acc.html#acc.p.db_insert... (unless async support was added to db_cluster in 4.4+). The reason for using async is that in the past I had kamailio crash with locks on acc preventing timely processing of requests.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
All,
Does anybody know if async support is on the roadmap for the db_cluster module? For now i can use haproxy for the ACC module but it would be nice if db_cluster will support it in the future.
Jan
Jan Hazenberg schreef op 2016-08-09 12:58:
Daniel,
Thanks for the info, i will keep that in mind!
Jan
Daniel Tryba schreef op 2016-08-09 11:23:
On Tue, Aug 09, 2016 at 09:54:28AM +0200, Jan Hazenberg wrote:
Or should i bypass the db_cluster for accounting?
I'm running kamailio 4.4.2.
With using db_cluster you are missing out on the async abilities of acc: http://www.kamailio.org/docs/modules/stable/modules/acc.html#acc.p.db_insert... (unless async support was added to db_cluster in 4.4+). The reason for using async is that in the past I had kamailio crash with locks on acc preventing timely processing of requests.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users