<div dir="ltr"><div>I just want to follow up with the thing that, using the sql-only mode, expired location records might not be deleted right away.<br>I just remembered all of the sudden, that the timer interval controls data clearing/updating when using sql-only mode.<br></div><div><br></div><div>Then you might also want to play with your timer interval value. How huge is that now?</div><div><a href="https://opensips.org/html/docs/modules/3.0.x/usrloc.html#param_timer_interval">https://opensips.org/html/docs/modules/3.0.x/usrloc.html#param_timer_interval</a></div><div><br></div><div>This one is responsible for clearing out expired contacts from the user location table.</div><div>Here is a quotation from the "sql-only" mod description:</div><div>"The timer deletes all
                        expired contacts from database - cleans after clients that didn't
                        un-register or re-register."</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Dec 11, 2020 at 9:22 AM Donat Zenichev <<a href="mailto:donat.zenichev@gmail.com">donat.zenichev@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Good morning Saurabh,</div><div>that sounds a bit odd, as the sql only mode supposes that usrloc.so updates the backend sql right away.</div><div><br></div><div>Do you have any warnings occurring in the OpenSIPS log?</div><div>There might be a case for an inability of OpenSIPS to reach the sql server at the moment of de-registration.</div><div>See if there are any re-connections to the database.<br></div><div><br></div><div>And also did you try to gather opensips logs with a debug level?</div><div>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.</div><div><br></div><div>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.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Dec 11, 2020 at 9:00 AM Saurabh Chopra <<a href="mailto:saurabhc@3clogic.com" target="_blank">saurabhc@3clogic.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi All,</div><div><br></div><div>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.</div><div><br></div><div>loadmodule "usrloc.so"<br>modparam("usrloc", "nat_bflag", "NAT")<br>modparam("usrloc", "db_mode", 3)<br>modparam("usrloc", "db_url", "mysql://root:xxxxg1c@localhost/opensips")<br></div><div><br></div><div><br></div><div>Does db_mode=3 used to work like this? Or I am missing something?</div><br clear="all"><div><div dir="ltr"><div dir="ltr">Best Regards<div>Saurabh Chopra</div><div>+918861979979</div></div></div></div></div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><br></div><div dir="ltr"><div dir="ltr"><font style="background-color:rgb(255,255,255)" color="#0b5394">Best regards,<br></font></div><div dir="ltr"><font style="background-color:rgb(255,255,255)" color="#0b5394">Donat Zenichev<br><br></font></div></div></div></div></div></div></div></div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><br></div><div dir="ltr"><div dir="ltr"><font style="background-color:rgb(255,255,255)" color="#0b5394">Best regards,<br></font></div><div dir="ltr"><font style="background-color:rgb(255,255,255)" color="#0b5394">Donat Zenichev<br><br></font></div></div></div></div></div></div></div></div>