[SR-Users] dmq_usrloc writes to database on other nodes too
Maarten Ureel
maarten at youreal.eu
Sun Oct 17 19:37:24 CEST 2021
True, but I am running our stuff on ECS as containers, so they are all the same.
I'll got with the approach of setting to "in memory" and writing to database with custom code, thanks.
Van: Henning Westerholt <hw at skalatan.de>
Verzonden: zondag 17 oktober 2021 18:56
Aan: Maarten Ureel <maarten at youreal.eu>; Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org>
Onderwerp: RE: dmq_usrloc writes to database on other nodes too
Hello,
I see. Another idea - you could configure the different servers individually regarding the DB writing, e.g. use it only on one server. This would make operation obviously different, so it depends on your architecture.
Cheers,
Henning
--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://gilawa.com<https://gilawa.com/>
From: Maarten Ureel <maarten at youreal.eu<mailto:maarten at youreal.eu>>
Sent: Sunday, October 17, 2021 6:10 PM
To: Henning Westerholt <hw at skalatan.de<mailto:hw at skalatan.de>>; Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org<mailto:sr-users at lists.kamailio.org>>
Subject: RE: dmq_usrloc writes to database on other nodes too
Hi Henning
I'm aware of that setting, but we rely on the database for some diagnostic tools etc.
So my idea now is to set it to memory-only, and write to database myself upon registration, I was just wondering if there was any more "built-in" way.
Van: Henning Westerholt <hw at skalatan.de<mailto:hw at skalatan.de>>
Verzonden: zondag 17 oktober 2021 13:16
Aan: Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org<mailto:sr-users at lists.kamailio.org>>
CC: Maarten Ureel <maarten at youreal.eu<mailto:maarten at youreal.eu>>
Onderwerp: RE: dmq_usrloc writes to database on other nodes too
Hello,
already tried to configure the usrloc/registrar modules in memory-only mode?
https://www.kamailio.org/docs/modules/5.5.x/modules/usrloc.html#usrloc.p.db_mode
Cheers,
Henning
--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://gilawa.com<https://gilawa.com/>
From: sr-users <sr-users-bounces at lists.kamailio.org<mailto:sr-users-bounces at lists.kamailio.org>> On Behalf Of Maarten Ureel
Sent: Friday, October 15, 2021 10:38 AM
To: sr-users at lists.kamailio.org<mailto:sr-users at lists.kamailio.org>
Subject: [SR-Users] dmq_usrloc writes to database on other nodes too
I have the idea that if you enable dmq_usrloc, the other nodes that receive the usrloc info, also try to write to database.
We see this by a lot of errors indicating the index violation on postgres.
What is the easiest way to tell Kamailio that it does not need to store the usrloc in database if the data came through a DMQ message?
Currently I have in my config:
# DMQ processing
if(is_method("KDMQ") && $Rp == 5090) {
dmq_handle_message();
}
I have understood that no further processing happens then. So is my assumption correct that my other handling of REGISTER will not be used then?
As in, can you handle this in code that it will only store the register information in memory? Like this?
# Registration handling
route[REGISTRAR] {
# If coming from DMQ, don't save to database
if(dmq_is_from_node()) {
save("location", "0x01")
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20211017/5fe39245/attachment.htm>
More information about the sr-users
mailing list