[OpenSIPS-Users] Db_mode=3(sql only) in USRLOC module in opensips_3.1

Saurabh Chopra saurabhc at 3clogic.com
Mon Dec 14 10:23:16 EST 2020


Hi Donat/Opensips Team,

Apologies for late response, but ideally the entry should be deleted after
un-registration is sent otherwise it will violate the RFC rule.
Also, this SQL Only Mode is perfectly working with opensips 2.2 and 3.0
versions with the same configuration. Could you guys try to replicate this
Or confirm if I am missing anything in the configuration side.


Best Regards
Saurabh Chopra
+918861979979


On Fri, Dec 11, 2020 at 2:22 PM Donat Zenichev <donat.zenichev at gmail.com>
wrote:

> I just want to follow up with the thing that, using the sql-only mode,
> expired location records might not be deleted right away.
> I just remembered all of the sudden, that the timer interval controls data
> clearing/updating when using sql-only mode.
>
> Then you might also want to play with your timer interval value. How huge
> is that now?
>
> https://opensips.org/html/docs/modules/3.0.x/usrloc.html#param_timer_interval
>
> This one is responsible for clearing out expired contacts from the user
> location table.
> Here is a quotation from the "sql-only" mod description:
> "The timer deletes all expired contacts from database - cleans after
> clients that didn't un-register or re-register."
>
> On Fri, Dec 11, 2020 at 9:22 AM Donat Zenichev <donat.zenichev at gmail.com>
> wrote:
>
>> Good morning Saurabh,
>> that sounds a bit odd, as the sql only mode supposes that usrloc.so
>> updates the backend sql right away.
>>
>> Do you have any warnings occurring in the OpenSIPS log?
>> There might be a case for an inability of OpenSIPS to reach the sql
>> server at the moment of de-registration.
>> See if there are any re-connections to the database.
>>
>> And also did you try to gather opensips logs with a debug level?
>> Try to see which log rows both "db_mysql.so" (if you are using mysql as a
>> backend db) and "usrloc.so" are throwing out into the log, when you send a
>> de-registration.
>>
>> Otherwise, you might also try to use either
>> "single-instance-sql-write-through" or "single-instance-sql-write-back",
>> which perhaps can better fit your demands.
>>
>>
>> On Fri, Dec 11, 2020 at 9:00 AM Saurabh Chopra <saurabhc at 3clogic.com>
>> wrote:
>>
>>> Hi All,
>>>
>>> I am testing a usrloc module with db_mode=3(sql only) and a strange
>>> thing is happening, when we send an unregistration request the user entry
>>> is not deleting from the database . However the entry is deleted after
>>> expiry timer.
>>>
>>> loadmodule "usrloc.so"
>>> modparam("usrloc", "nat_bflag", "NAT")
>>> modparam("usrloc", "db_mode", 3)
>>> modparam("usrloc", "db_url", "mysql://root:xxxxg1c@localhost/opensips")
>>>
>>>
>>> Does db_mode=3 used to work like this? Or I am missing something?
>>>
>>> Best Regards
>>> Saurabh Chopra
>>> +918861979979
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>
>>
>> --
>>
>> Best regards,
>> Donat Zenichev
>>
>>
>
> --
>
> Best regards,
> Donat Zenichev
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20201214/20d3e1d6/attachment.html>


More information about the Users mailing list