<div dir="auto"><div dir="ltr"><div><div><div>Hi Razvan<br></div>Interesting detail is that the flushing of binding works OK<br></div>when I use real backend mysql instead of virtual_db<br><br></div>so when I put the following snippet in place in opensips.cfg it does work correctly/as expected<br>modparam("usrloc", "db_url","mysql://opensips:<wbr>opensipsrw@XXXXXXX/opensips")<br>### TEMP MOD<br>#modparam("usrloc", "db_url","virtual://pmset")</div><div dir="ltr"><br></div><div dir="ltr">So the virtdb module does something wrong or at least delays flushing queries in this case<br><br>Stefan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 9, 2017 at 4:23 PM, Stefan Tobé <span dir="ltr"><<a href="mailto:stefan.tobe@pmfactory.nl" target="_blank">stefan.tobe@pmfactory.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Razvan, please find both pcap and query of mysql backend (location table) attached.<div><div class="m_5353020051737228449h5"><br><div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>no we dont see failover, single DB backend being used.<br></div>regards<span class="m_5353020051737228449m_-5682169151118596180HOEnZb"><font color="#888888"><br>Stefan</font></span><div><div class="m_5353020051737228449m_-5682169151118596180h5"><br><div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 9, 2017 at 2:39 PM, Răzvan Crainea <span dir="ltr"><<a href="mailto:razvan@opensips.org" target="_blank">razvan@opensips.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<tt>Hi, Stefan!<br>
<br>
Indeed, there is no "Deleted" state in the db, not even in
opensips' memory.<br>
Can you paste the records of two bindings that should not be
there?<br>
Since you are using db_virtual, are you experiencing any failover?<br>
<br>
Best regards,<br>
</tt><span>
<pre class="m_5353020051737228449m_-5682169151118596180m_6206950654775128004m_8813139725593413302moz-signature" cols="72">Răzvan Crainea
OpenSIPS Developer
<a class="m_5353020051737228449m_-5682169151118596180m_6206950654775128004m_8813139725593413302moz-txt-link-abbreviated" href="http://www.opensips-solutions.com" target="_blank">www.opensips-solutions.com</a></pre>
</span><div><div class="m_5353020051737228449m_-5682169151118596180m_6206950654775128004h5"><div class="m_5353020051737228449m_-5682169151118596180m_6206950654775128004m_8813139725593413302moz-cite-prefix">On 10/09/2017 02:48 PM, Stefan Tobé
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div>Hi Razvan,<br>
</div>
thanks for replying<br>
<br>
</div>
I notice that the bindings remain in the DB for a while (at
least > 5min), sometimes they are deleted immediately (as
I would expect), some other times they remain in the table.<br>
</div>
So reregistering returns 200OK (2 bindings or 3 , increasing).
Re querying the DB shows an increment of equal bindings for a
client until the limit is reached for max amount of
registrations in the config (10 by default I believe?). <br>
<br>
If I decrease that setting lets say to modparam("registrar",
"max_contacts", 2) then I will very soon get an error reply
back. Note that this behavior (increment of bindings) is not
consequently observed (it is intermittent).<br>
<br>
</div>
The DB setting in the config (config was attached to original
email as well as pcap) is:<br>
<br>
#### USeR LOCation module<br>
loadmodule "usrloc.so"<br>
#modparam("usrloc", "nat_bflag", "NAT")<br>
modparam("usrloc", "db_mode", 3)<br>
modparam("usrloc", "db_url","virtual://pmset")<br>
<div>
<div>
<div>
<div><br>
</div>
<div><br>
</div>
<div>You mention a '<i>Deleted</i>' state, but I was
unable to find that flag . Should that be in <i>opensips.location</i>
table?<br>
</div>
</div>
</div>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Oct 9, 2017 at 11:21 AM, Răzvan
Crainea <span dir="ltr"><<a href="mailto:razvan@opensips.org" target="_blank">razvan@opensips.org</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF"> <tt>Hi, Stefan!<br>
<br>
Are you saying that the Contacts "leak" in the database
(they are never deleted), or that they are not deleted
immediately after the client is deregistering (but they
are a bit later)?<br>
<br>
What is the db_mode setting[1] you are using for the
usrloc module? Also, note that the Contacts might still
be present in the database after they are deleted, but
with a Deleted state. If that's the case, this is
perfectly fine.<br>
<br>
[1] <a class="m_5353020051737228449m_-5682169151118596180m_6206950654775128004m_8813139725593413302m_-5532590333889106082moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/2.3.x/usrloc.html#idp5620912" target="_blank">http://www.opensips.org/html/d<wbr>ocs/modules/2.3.x/usrloc.html#<wbr>idp5620912</a><br>
<br>
Best regards,<br>
</tt>
<pre class="m_5353020051737228449m_-5682169151118596180m_6206950654775128004m_8813139725593413302m_-5532590333889106082moz-signature" cols="72">Răzvan Crainea
OpenSIPS Developer
<a class="m_5353020051737228449m_-5682169151118596180m_6206950654775128004m_8813139725593413302m_-5532590333889106082moz-txt-link-abbreviated" href="http://www.opensips-solutions.com" target="_blank">www.opensips-solutions.com</a></pre>
<div>
<div class="m_5353020051737228449m_-5682169151118596180m_6206950654775128004m_8813139725593413302h5">
<div class="m_5353020051737228449m_-5682169151118596180m_6206950654775128004m_8813139725593413302m_-5532590333889106082moz-cite-prefix">On
10/09/2017 11:57 AM, Stefan Tobé wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div class="m_5353020051737228449m_-5682169151118596180m_6206950654775128004m_8813139725593413302h5">
<div dir="ltr"><br>
<div class="gmail_quote">
<div dir="ltr">
<div>
<div>
<div>
<div>Hi there,<br>
</div>
I noticed that opensips 2.2.5-1
intermittently does NOT flush the
contact when the client is
deregistering.</div>
<div>It is reproducable with multple sip
clients. opensips 2.3 also suffers from
this issue.<br>
</div>
<div><br>
</div>
When I check the mysql database backend I
can see that the entry is table
opensips.location is not consistently
deleted.</div>
<div>It works for several times and the
subsequently it does not flush the contact
showing two bindings the next time the
client is registered.</div>
<div><br>
</div>
<div><br>
</div>
I can unfortunately not monitor the sql
queries because opensips is using tls for
secure transmission.<br>
</div>
I use mysql as backend and the config is
attached as well as the local wireshark trace
I took<span class="m_5353020051737228449m_-5682169151118596180m_6206950654775128004m_8813139725593413302m_-5532590333889106082HOEnZb"><font color="#888888"><br clear="all">
<div>
<div>
<div>
<div>
<div><br>
<br>
</div>
</div>
</div>
</div>
</div>
</font></span></div>
</div>
<br>
<br clear="all">
<br>
-- <br>
<div class="m_5353020051737228449m_-5682169151118596180m_6206950654775128004m_8813139725593413302m_-5532590333889106082gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div><span>
<div>mvg<br>
Stefan Tobé<br>
<br>
</div>
<br>
</span></div>
<div>
<div><span>PM Factory B.V.<br>
Bolderweg 2<br>
1332 AT Almere<br>
tel: 06 21 26 59 68<br>
email: <a href="mailto:stefan.tobe@privatemobility.nl" target="_blank">stefan.tobe@pmfactory.nl</a><br>
</span></div>
<div><span>PGP public key: <a href="https://drive.google.com/file/d/0Bzu42C2IZ1uMNDYzVnM2dkppRVE/view?usp=sharing" target="_blank">click
here to download</a><br>
</span></div>
<div><span><br>
</span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="m_5353020051737228449m_-5682169151118596180m_6206950654775128004m_8813139725593413302m_-5532590333889106082mimeAttachmentHeader"></fieldset>
<br>
</div>
</div>
<pre>______________________________<wbr>_________________
Users mailing list
<a class="m_5353020051737228449m_-5682169151118596180m_6206950654775128004m_8813139725593413302m_-5532590333889106082moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a class="m_5353020051737228449m_-5682169151118596180m_6206950654775128004m_8813139725593413302m_-5532590333889106082moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</div>
<br>
______________________________<wbr>_________________<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-<wbr>bin/mailman/listinfo/users</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
<div class="m_5353020051737228449m_-5682169151118596180m_6206950654775128004m_8813139725593413302gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div><span>
<div>mvg<br>
Stefan Tobé<br>
<br>
</div>
<br>
</span></div>
<div>
<div><span>PM Factory B.V.<br>
Bolderweg 2<br>
1332 AT Almere<br>
tel: 06 21 26 59 68<br>
email: <a href="mailto:stefan.tobe@privatemobility.nl" target="_blank">stefan.tobe@pmfactory.nl</a><br>
</span></div>
<div><span>PGP public key: <a href="https://drive.google.com/file/d/0Bzu42C2IZ1uMNDYzVnM2dkppRVE/view?usp=sharing" target="_blank">click
here to download</a><br>
</span></div>
<div><span><br>
</span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="m_5353020051737228449m_-5682169151118596180m_6206950654775128004m_8813139725593413302mimeAttachmentHeader"></fieldset>
<br>
<pre>______________________________<wbr>_________________
Users mailing list
<a class="m_5353020051737228449m_-5682169151118596180m_6206950654775128004m_8813139725593413302moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a class="m_5353020051737228449m_-5682169151118596180m_6206950654775128004m_8813139725593413302moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</div></div></div>
<br>______________________________<wbr>_________________<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-<wbr>bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="m_5353020051737228449m_-5682169151118596180m_6206950654775128004gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><span><div>mvg<br>Stefan Tobé<br><br></div><br></span></div><div><div><span>PM Factory B.V.<br>Bolderweg 2<br>1332 AT Almere<br>tel: 06 21 26 59 68<br>email: <a href="mailto:stefan.tobe@privatemobility.nl" target="_blank">stefan.tobe@pmfactory.nl</a><br></span></div><div><span>PGP public key: <a href="https://drive.google.com/file/d/0Bzu42C2IZ1uMNDYzVnM2dkppRVE/view?usp=sharing" target="_blank">click here to download</a><br></span></div><div><span><br><a href="http://www.privatemobility.nl" target="_blank"></a></span></div></div></div></div></div></div></div></div></div></div>
</div></div></div></div></div></div></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="m_5353020051737228449m_-5682169151118596180gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><span><div>mvg<br>Stefan Tobé<br><br></div><br></span></div><div><div><span>PM Factory B.V.<br>Bolderweg 2<br>1332 AT Almere<br>tel: 06 21 26 59 68<br>email: <a href="mailto:stefan.tobe@privatemobility.nl" target="_blank">stefan.tobe@pmfactory.nl</a><br></span></div><div><span>PGP public key: <a href="https://drive.google.com/file/d/0Bzu42C2IZ1uMNDYzVnM2dkppRVE/view?usp=sharing" target="_blank">click here to download</a><br></span></div><div><span><br><a href="http://www.privatemobility.nl" target="_blank"></a></span></div></div></div></div></div></div></div></div></div></div>
</div></div></div></div></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="m_5353020051737228449gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><span><div>mvg<br>Stefan Tobé<br><br></div><br></span></div><div><div><span>PM Factory B.V.<br>Bolderweg 2<br>1332 AT Almere<br>tel: 06 21 26 59 68<br>email: <a href="mailto:stefan.tobe@privatemobility.nl" target="_blank">stefan.tobe@pmfactory.nl</a><br></span></div><div><span>PGP public key: <a href="https://drive.google.com/file/d/0Bzu42C2IZ1uMNDYzVnM2dkppRVE/view?usp=sharing" target="_blank">click here to download</a><br></span></div><div><span><br><a href="http://www.privatemobility.nl" target="_blank"></a></span></div></div></div></div></div></div></div></div></div></div>
</div>