<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<tt>OK, I pushed on master a patch to move the initial data load
after the startup sequence. The patch should apply to 2.4 also. <br>
<br>
<a class="moz-txt-link-freetext" href="https://github.com/OpenSIPS/opensips/commit/32cba1d751ee5a5b705da97ac4333fcad3d67728">https://github.com/OpenSIPS/opensips/commit/32cba1d751ee5a5b705da97ac4333fcad3d67728</a><br>
<br>
While checking the module, I found some issues with it:<br>
<br>
* before my patch, the load (for same data) was independently
done in each opensips process (even if the data is shared) :)<br>
<br>
* the "reload" is no error pron - if the new data load fails,
the old existing data is lost<br>
<br>
* during the data reload the module has no data, so it cannot
operate (it will actually block) - normally it should continue
with the old data until the new data is fully loaded and
validated.<br>
<br>
Let me know if the patch makes a different for you and I will
backport it to 2.4 too.<br>
<br>
Regards,<br>
</tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
OpenSIPS Bootcamp 2018
<a class="moz-txt-link-freetext" href="http://opensips.org/training/OpenSIPS_Bootcamp_2018/">http://opensips.org/training/OpenSIPS_Bootcamp_2018/</a>
</pre>
<div class="moz-cite-prefix">On 10/02/2018 04:18 PM, Bogdan-Andrei
Iancu wrote:<br>
</div>
<blockquote type="cite"
cite="mid:49ce1d5c-0842-9124-fe2a-339e63066193@opensips.org">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<tt>Hi,<br>
<br>
Taking a closer look at the module (to be honest I do not user
it, as drouting does a similar job) I see the module is loading
the data into memory. It is doing this during the init stage,
holding back the entire OpenSIPS startup. <br>
Module doing similar heavy db load were changed to do the load
post-startup. Let patch the module to decouple the loading from
the startup, so that OpenSIPS will start without delays.<br>
<br>
Regards,<br>
</tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com" moz-do-not-send="true">http://www.opensips-solutions.com</a>
OpenSIPS Bootcamp 2018
<a class="moz-txt-link-freetext" href="http://opensips.org/training/OpenSIPS_Bootcamp_2018/" moz-do-not-send="true">http://opensips.org/training/OpenSIPS_Bootcamp_2018/</a>
</pre>
<div class="moz-cite-prefix">On 10/02/2018 04:04 PM, Jon Abrams
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAP9sNzFm-yrAVPL0E-3-ZSYhDw7bwjaGdm5QV9_u6tf7X0gAHA@mail.gmail.com">
<div dir="ltr">
<div>OpenSIPs is loading the global blacklist into a digit
trie structure into shared memory on startup (or
reload_blacklist command). That causes the startup delay.</div>
<div><br>
</div>
<div>- Jon<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Tue, Oct 2, 2018 at 7:55 AM Abdul Basit <<a
href="mailto:basit.engg@gmail.com" moz-do-not-send="true">basit.engg@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">Hi Bogdan,
<div><br>
</div>
<div>I don't think so its translating to DB query on
run time, instead its caching the blacklist.</div>
<div>I am saying so because opensips response is
quick, where as when I query manually from DB, it
take some time even prefix col. is indexed.<br>
<div>Moreover, while opensips restart i get
following warnings in syslog: </div>
<div><br>
</div>
<br>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</blockquote>
</blockquote>
<br>
</body>
</html>