<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Thanks a lot. <div>Earlier status</div><div><div>Opensips service was started in <b>(<font color="#ff0000">real 1m6.474s</font>)</b></div><div><br></div><div><div class="gmail-hljs gmail-apache" style="display:block;overflow-x:auto;padding:0.5em;color:rgb(51,51,51);background:rgb(248,248,248);font-family:monospace"><div><div><span class="gmail-hljs-comment" style="color:rgb(136,136,136)"># time opensipsctl fifo reload_blacklist</span></div><div><span class="gmail-hljs-comment" style="color:rgb(136,136,136)">WARNING: database engine not found - tried 'MYSQL'</span></div><div><br></div><div><span class="gmail-hljs-comment" style="color:rgb(136,136,136)">real 0m3.948s</span></div><div><span class="gmail-hljs-comment" style="color:rgb(136,136,136)">user 0m0.039s</span></div><div><span class="gmail-hljs-comment" style="color:rgb(136,136,136)">sys 0m0.013s</span></div></div><div></div></div></div><br><div></div><div><div class="gmail-hljs gmail-css" style="display:block;overflow-x:auto;padding:0.5em;color:rgb(51,51,51);background:rgb(248,248,248);font-family:monospace"><div><span class="gmail-hljs-selector-tag" style="">time</span> <span class="gmail-hljs-selector-tag" style="">systemctl</span> <span class="gmail-hljs-selector-tag" style="">stop</span> <span class="gmail-hljs-selector-tag" style="">opensips</span> <br></div><div><div><br></div><div><span class="gmail-hljs-selector-tag" style="">real</span> 0<span class="gmail-hljs-selector-tag" style="">m1</span><span class="gmail-hljs-selector-class" style="color:rgb(136,0,0)">.424s</span></div><div><span class="gmail-hljs-selector-class" style="color:rgb(136,0,0)">user</span> 0<span class="gmail-hljs-selector-tag" style="">m0</span><span class="gmail-hljs-selector-class" style="color:rgb(136,0,0)">.004s</span></div><div><span class="gmail-hljs-selector-class" style="color:rgb(136,0,0)">sys</span> 0<span class="gmail-hljs-selector-tag" style="">m0</span><span class="gmail-hljs-selector-class" style="color:rgb(136,0,0)">.000s</span></div></div></div></div><br><b><font color="#274e13">I pulled source from master.</font></b><br></div><div><br></div><div><div class="gmail-hljs gmail-ruby" style="display:block;overflow-x:auto;padding:0.5em;color:rgb(51,51,51);background:rgb(248,248,248);font-family:monospace"><div><div><span class="gmail-hljs-comment" style="color:rgb(136,136,136)"># time systemctl start opensips </span></div><div><span class="gmail-hljs-comment" style="color:rgb(136,136,136)">Oct 2 15:57:41 srouter-215 systemd[1]: Starting OpenSIPS is a very fast and flexible SIP (RFC3261) server... </span></div><div><span class="gmail-hljs-comment" style="color:rgb(136,136,136)">Oct 2 15:57:41 srouter-215 opensips[15906]: Listening on </span></div><div><span class="gmail-hljs-comment" style="color:rgb(136,136,136)">Oct 2 15:57:41 srouter-215 opensips[15906]: udp: x.x.x.x [x.x.x.x]:9020 </span></div><div><span class="gmail-hljs-comment" style="color:rgb(136,136,136)">Oct 2 15:57:41 srouter-215 opensips[15906]: udp: x6:x6:x6:x6:x6:x6 [[x6:x6:0:0:x6:x6:x6:x6]]:9020 </span></div><div><span class="gmail-hljs-comment" style="color:rgb(136,136,136)">Oct 2 15:57:41 srouter-215 opensips[15906]: Aliases: </span></div><div><span class="gmail-hljs-comment" style="color:rgb(136,136,136)">Oct 2 15:57:41 srouter-215 opensips[15906]: *: x.x.x.x:* </span></div><div><br></div><div><span class="gmail-hljs-comment" style="color:rgb(136,136,136)">real 0m0.066s</span></div><div><span class="gmail-hljs-comment" style="color:rgb(136,136,136)">user 0m0.003s</span></div><div><span class="gmail-hljs-comment" style="color:rgb(136,136,136)">sys 0m0.002s</span></div><div><span class="gmail-hljs-comment" style="color:rgb(136,136,136)">root<span class="gmail-hljs-doctag" style="font-weight:bold">@srouter</span>-215:~# Oct 2 15:57:41 srouter-215 systemd[1]: Started OpenSIPS is a very fast and flexible SIP (RFC3261) server. </span></div></div></div></div><div><div></div></div><div dir="ltr"><br></div><div>/var/log/opensips.log is here ... <a href="https://pastebin.com/8md6sBiP">https://pastebin.com/8md6sBiP</a></div><div dir="ltr"><br></div><div><div class="gmail-hljs gmail-apache" style="display:block;overflow-x:auto;padding:0.5em;color:rgb(51,51,51);background:rgb(248,248,248);font-family:monospace"><div><div><span class="gmail-hljs-comment" style="color:rgb(136,136,136)"># time opensipsctl fifo reload_blacklist</span></div><div><span class="gmail-hljs-comment" style="color:rgb(136,136,136)">WARNING: database engine not found - tried 'MYSQL'</span></div><div><span class="gmail-hljs-comment" style="color:rgb(136,136,136)">Oct 2 16:17:24 srouter-215 SIPSrv[16185]: INFO:userblacklist:reload_sources: got 1386901 entries from 'globalblacklist' </span></div><div><br></div><div><span class="gmail-hljs-comment" style="color:rgb(136,136,136)">real 0m41.551s</span></div><div><span class="gmail-hljs-comment" style="color:rgb(136,136,136)">user 0m0.037s</span></div><div><span class="gmail-hljs-comment" style="color:rgb(136,136,136)">sys 0m0.015s</span></div></div><div></div></div></div><br><div><div class="gmail-hljs gmail-css" style="display:block;overflow-x:auto;padding:0.5em;color:rgb(51,51,51);background:rgb(248,248,248);font-family:monospace"><div><div># <span class="gmail-hljs-selector-tag" style="">time</span> <span class="gmail-hljs-selector-tag" style="">systemctl</span> <span class="gmail-hljs-selector-tag" style="">stop</span> <span class="gmail-hljs-selector-tag" style="">opensips</span> </div><div><span class="gmail-hljs-selector-tag" style="">Oct</span> 2 16<span class="gmail-hljs-selector-pseudo" style="color:rgb(188,96,96)">:06</span><span class="gmail-hljs-selector-pseudo" style="color:rgb(188,96,96)">:38</span> <span class="gmail-hljs-selector-tag" style="">srouter-215</span> <span class="gmail-hljs-selector-tag" style="">systemd</span><span class="gmail-hljs-selector-attr" style="color:rgb(188,96,96)">[1]</span>: <span class="gmail-hljs-selector-tag" style="">Stopping</span> <span class="gmail-hljs-selector-tag" style="">OpenSIPS</span> <span class="gmail-hljs-selector-tag" style="">is</span> <span class="gmail-hljs-selector-tag" style="">a</span> <span class="gmail-hljs-selector-tag" style="">very</span> <span class="gmail-hljs-selector-tag" style="">fast</span> <span class="gmail-hljs-selector-tag" style="">and</span> <span class="gmail-hljs-selector-tag" style="">flexible</span> <span class="gmail-hljs-selector-tag" style="">SIP</span> (<span class="gmail-hljs-selector-tag" style="">RFC3261</span>) <span class="gmail-hljs-selector-tag" style="">server</span>... </div><div><span class="gmail-hljs-selector-tag" style="">Oct</span> 2 16<span class="gmail-hljs-selector-pseudo" style="color:rgb(188,96,96)">:06</span><span class="gmail-hljs-selector-pseudo" style="color:rgb(188,96,96)">:50</span> <span class="gmail-hljs-selector-tag" style="">srouter-215</span> <span class="gmail-hljs-selector-tag" style="">systemd</span><span class="gmail-hljs-selector-attr" style="color:rgb(188,96,96)">[1]</span>: <span class="gmail-hljs-selector-tag" style="">Stopped</span> <span class="gmail-hljs-selector-tag" style="">OpenSIPS</span> <span class="gmail-hljs-selector-tag" style="">is</span> <span class="gmail-hljs-selector-tag" style="">a</span> <span class="gmail-hljs-selector-tag" style="">very</span> <span class="gmail-hljs-selector-tag" style="">fast</span> <span class="gmail-hljs-selector-tag" style="">and</span> <span class="gmail-hljs-selector-tag" style="">flexible</span> <span class="gmail-hljs-selector-tag" style="">SIP</span> (<span class="gmail-hljs-selector-tag" style="">RFC3261</span>) <span class="gmail-hljs-selector-tag" style="">server</span>. </div><div><br></div><div><span class="gmail-hljs-selector-tag" style="">real</span> 0<span class="gmail-hljs-selector-tag" style="">m12</span><span class="gmail-hljs-selector-class" style="color:rgb(136,0,0)">.134s</span></div><div><span class="gmail-hljs-selector-class" style="color:rgb(136,0,0)">user</span> 0<span class="gmail-hljs-selector-tag" style="">m0</span><span class="gmail-hljs-selector-class" style="color:rgb(136,0,0)">.003s</span></div><div><span class="gmail-hljs-selector-class" style="color:rgb(136,0,0)">sys</span> 0<span class="gmail-hljs-selector-tag" style="">m0</span><span class="gmail-hljs-selector-class" style="color:rgb(136,0,0)">.002s</span></div></div><div><br></div><div><div></div></div></div></div><br><div><div>Looks like issue has been fixed.. :)</div></div><div><br></div><div><div><div dir="ltr" class="gmail_signature"><div><font size="2"><span style="font-family:verdana,sans-serif"><span style="color:rgb(39,78,19)">--<br>regards,</span></span></font></div><font size="2"><span style="font-family:verdana,sans-serif"><span style="color:rgb(39,78,19)"><br>abdul basit</span></span></font></div></div><br></div></div></div></div></div></div></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, 2 Oct 2018 at 18:55, Bogdan-Andrei Iancu <<a href="mailto:bogdan@opensips.org">bogdan@opensips.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div 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="m_-8755737668942482938moz-txt-link-freetext" href="https://github.com/OpenSIPS/opensips/commit/32cba1d751ee5a5b705da97ac4333fcad3d67728" target="_blank">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="m_-8755737668942482938moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="m_-8755737668942482938moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a>
OpenSIPS Bootcamp 2018
<a class="m_-8755737668942482938moz-txt-link-freetext" href="http://opensips.org/training/OpenSIPS_Bootcamp_2018/" target="_blank">http://opensips.org/training/OpenSIPS_Bootcamp_2018/</a>
</pre>
<div class="m_-8755737668942482938moz-cite-prefix">On 10/02/2018 04:18 PM, Bogdan-Andrei
Iancu wrote:<br>
</div>
<blockquote type="cite">
<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="m_-8755737668942482938moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="m_-8755737668942482938moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a>
OpenSIPS Bootcamp 2018
<a class="m_-8755737668942482938moz-txt-link-freetext" href="http://opensips.org/training/OpenSIPS_Bootcamp_2018/" target="_blank">http://opensips.org/training/OpenSIPS_Bootcamp_2018/</a>
</pre>
<div class="m_-8755737668942482938moz-cite-prefix">On 10/02/2018 04:04 PM, Jon Abrams
wrote:<br>
</div>
<blockquote type="cite">
<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" target="_blank">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>
</div>
</blockquote></div>