<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <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">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: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>
                  <div>
                    <div>
                      <div class="m_-3953847647696378825hljs
                        m_-3953847647696378825cs"
style="display:block;overflow-x:auto;padding:0.5em;color:rgb(51,51,51);background:rgb(248,248,248);font-family:monospace">
                        <div>Oct  <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">2</span> <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">12</span>:<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">35</span>:<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">28</span> srouter<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">-215</span>
                          SIPSrv[<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">20876</span>]:
                          WARNING:core:timer_ticker: timer task
                          <nh-timer> already scheduled <span
                            class="m_-3953847647696378825hljs-keyword"
                            style="font-weight:bold">for</span> <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">990</span> ms
                          (now <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">17920</span> ms),
                          it may overlap.. <br>
                        </div>
                        <div>Oct  <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">2</span> <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">12</span>:<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">35</span>:<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">28</span> srouter<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">-215</span>
                          SIPSrv[<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">20876</span>]:
                          WARNING:core:timer_ticker: timer task
                          <dlg-reinvite-pinger> already scheduled
                          <span
                            class="m_-3953847647696378825hljs-keyword"
                            style="font-weight:bold">for</span> <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">990</span> ms
                          (now <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">17920</span> ms),
                          it may overlap.. </div>
                        <div>Oct  <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">2</span> <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">12</span>:<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">35</span>:<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">28</span> srouter<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">-215</span>
                          SIPSrv[<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">20876</span>]:
                          WARNING:core:timer_ticker: timer task
                          <dlg-options-pinger> already scheduled <span
                            class="m_-3953847647696378825hljs-keyword"
                            style="font-weight:bold">for</span> <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">990</span> ms
                          (now <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">17920</span> ms),
                          it may overlap.. </div>
                        <div>Oct  <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">2</span> <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">12</span>:<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">35</span>:<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">28</span> srouter<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">-215</span>
                          SIPSrv[<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">20876</span>]:
                          WARNING:core:timer_ticker: timer task
                          <dlg-timer> already scheduled <span
                            class="m_-3953847647696378825hljs-keyword"
                            style="font-weight:bold">for</span> <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">990</span> ms
                          (now <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">17920</span> ms),
                          it may overlap.. </div>
                        <div>Oct  <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">2</span> <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">12</span>:<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">35</span>:<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">28</span> srouter<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">-215</span>
                          SIPSrv[<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">20876</span>]:
                          WARNING:core:timer_ticker: timer task
                          <tm-timer> already scheduled <span
                            class="m_-3953847647696378825hljs-keyword"
                            style="font-weight:bold">for</span> <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">990</span> ms
                          (now <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">17920</span> ms),
                          it may overlap.. </div>
                        <div>Oct  <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">2</span> <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">12</span>:<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">35</span>:<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">28</span> srouter<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">-215</span>
                          SIPSrv[<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">20876</span>]:
                          WARNING:core:timer_ticker: timer task
                          <blcore-expire> already scheduled <span
                            class="m_-3953847647696378825hljs-keyword"
                            style="font-weight:bold">for</span> <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">990</span> ms
                          (now <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">17920</span> ms),
                          it may overlap.. </div>
                        <div>Oct  <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">2</span> <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">12</span>:<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">35</span>:<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">28</span> srouter<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">-215</span>
                          SIPSrv[<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">20876</span>]:
                          WARNING:core:utimer_ticker: utimer task
                          <tm-utimer> already scheduled <span
                            class="m_-3953847647696378825hljs-keyword"
                            style="font-weight:bold">for</span> <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">100</span> ms
                          (now <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">18020</span> ms),
                          it may overlap.. </div>
                        <div>Oct  <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">2</span> <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">12</span>:<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">35</span>:<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">28</span> srouter<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">-215</span>
                          SIPSrv[<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">20876</span>]:
                          WARNING:core:utimer_ticker: utimer task
                          <tm-utimer> already scheduled <span
                            class="m_-3953847647696378825hljs-keyword"
                            style="font-weight:bold">for</span> <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">100</span> ms
                          (now <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">18120</span> ms),
                          it may overlap.. </div>
                        <div>Oct  <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">2</span> <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">12</span>:<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">35</span>:<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">28</span> srouter<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">-215</span>
                          SIPSrv[<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">20876</span>]:
                          WARNING:core:utimer_ticker: utimer task
                          <tm-utimer> already scheduled <span
                            class="m_-3953847647696378825hljs-keyword"
                            style="font-weight:bold">for</span> <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">100</span> ms
                          (now <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">18220</span> ms),
                          it may overlap.. </div>
                        <div><b>Oct  <span
                              class="m_-3953847647696378825hljs-number"
                              style="color:rgb(136,0,0)">2</span> <span
                              class="m_-3953847647696378825hljs-number"
                              style="color:rgb(136,0,0)">12</span>:<span
                              class="m_-3953847647696378825hljs-number"
                              style="color:rgb(136,0,0)">35</span>:<span
                              class="m_-3953847647696378825hljs-number"
                              style="color:rgb(136,0,0)">28</span>
                            srouter<span
                              class="m_-3953847647696378825hljs-number"
                              style="color:rgb(136,0,0)">-215</span>
                            SIPSrv[<span
                              class="m_-3953847647696378825hljs-number"
                              style="color:rgb(136,0,0)">20882</span>]:
                            <a class="moz-txt-link-freetext" href="INFO:userblacklist:reload_sources">INFO:userblacklist:reload_sources</a>: got <span
                              class="m_-3953847647696378825hljs-number"
                              style="color:rgb(136,0,0)">1386901</span>
                            entries <span
                              class="m_-3953847647696378825hljs-keyword"
                              style="font-weight:bold">from</span> <span
                              class="m_-3953847647696378825hljs-string"
                              style="color:rgb(136,0,0)">'globalblacklist'</span> </b></div>
                        <div>Oct  <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">2</span> <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">12</span>:<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">35</span>:<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">28</span> srouter<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">-215</span>
                          SIPSrv[<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">20882</span>]:
                          WARNING:core:handle_timer_job: utimer job
                          <tm-utimer> has a <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">18170000</span>
                          us delay <span
                            class="m_-3953847647696378825hljs-keyword"
                            style="font-weight:bold">in</span>
                          execution </div>
                        <div>Oct  <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">2</span> <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">12</span>:<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">35</span>:<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">28</span> srouter<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">-215</span>
                          SIPSrv[<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">20882</span>]:
                          WARNING:core:handle_timer_job: timer job
                          <nh-timer> has a <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">17280000</span>
                          us delay <span
                            class="m_-3953847647696378825hljs-keyword"
                            style="font-weight:bold">in</span>
                          execution </div>
                        <div>Oct  <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">2</span> <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">12</span>:<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">35</span>:<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">28</span> srouter<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">-215</span>
                          SIPSrv[<span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">20882</span>]:
                          WARNING:core:handle_timer_job: timer job
                          <dlg-reinvite-pinger> has a <span
                            class="m_-3953847647696378825hljs-number"
                            style="color:rgb(136,0,0)">17280000</span>
                          us delay <span
                            class="m_-3953847647696378825hljs-keyword"
                            style="font-weight:bold">in</span>
                          execution </div>
                      </div>
                    </div>
                    <br>
                  </div>
                  <div>Once globalblacklist loaded <b
style="color:rgb(51,51,51);font-family:monospace;background-color:rgb(248,248,248)"><span
                        class="m_-3953847647696378825gmail-hljs-number"
                        style="color:rgb(136,0,0)">1386901</span> entries</b> ,
                    opensips behave normally. </div>
                  <div>When I will add more records to globalblacklist,
                    opensips wouldn't start due to service timeout.</div>
                  <div>One way might be to increase service timeout to
                    allow opensips keep loading the entries but it may
                    take ages. </div>
                  <div><br>
                  </div>
                  <div>
                    <div>
                      <div dir="ltr"
                        class="m_-3953847647696378825gmail_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>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <br>
          <div class="gmail_quote">
            <div dir="ltr">On Tue, 2 Oct 2018 at 13:19, Bogdan-Andrei
              Iancu <<a href="mailto:bogdan@opensips.org"
                target="_blank" moz-do-not-send="true">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>Hi Abdul,<br>
                  <br>
                  OK, but what is the blacklist related operation you do
                  in startup route ?? As far as I know, the blacklist
                  module is not doing any kind of caching, so any check
                  you do against the blacklists will translate into a DB
                  query, right ?<br>
                  <br>
                  Regards,<br>
                </tt>
                <pre class="m_-3953847647696378825m_7591727934642041896moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="m_-3953847647696378825m_7591727934642041896moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank" moz-do-not-send="true">http://www.opensips-solutions.com</a>
OpenSIPS Bootcamp 2018
  <a class="m_-3953847647696378825m_7591727934642041896moz-txt-link-freetext" href="http://opensips.org/training/OpenSIPS_Bootcamp_2018/" target="_blank" moz-do-not-send="true">http://opensips.org/training/OpenSIPS_Bootcamp_2018/</a>
</pre>
                <div
                  class="m_-3953847647696378825m_7591727934642041896moz-cite-prefix">On
                  10/01/2018 06:58 PM, Abdul Basit wrote:<br>
                </div>
                <blockquote type="cite">
                  <div dir="ltr">
                    <div dir="ltr">
                      <div dir="ltr">
                        <div dir="ltr">
                          <div dir="ltr">Yes. That's right.</div>
                          <div dir="ltr">The code I am using is as
                            below. <span style="background-color:rgb(254,254,238);color:rgb(102,102,102);font-family:"Lucida Console","Andale Mono","Courier New",Courier;font-size:11.7072px;white-space:pre-wrap">globalblacklist</span> table
                            has complete number as <span style="background-color:rgb(254,254,238);color:rgb(102,102,102);font-family:"Lucida Console","Andale Mono","Courier New",Courier;font-size:11.7072px;white-space:pre-wrap">prefix</span><span style="background-color:rgb(254,254,238);color:rgb(102,102,102);font-family:"Lucida Console","Andale Mono","Courier New",Courier;font-size:11.7072px;white-space:pre-wrap"> </span>with
                            and <span style="background-color:rgb(245,245,245);color:rgb(102,102,102);font-family:"Lucida Console","Andale Mono","Courier New",Courier;font-size:11.7072px;white-space:pre-wrap">whitelist</span> status. 
                             </div>
                          <div dir="ltr">
                            <div>
                              <div><br>
                              </div>
                              <div>
                                <div>
                                  <div
                                    class="m_-3953847647696378825m_7591727934642041896hljs
m_-3953847647696378825m_7591727934642041896bash"
style="display:block;overflow-x:auto;padding:0.5em;color:rgb(51,51,51);background:rgb(248,248,248);font-family:monospace">
                                    <div>route {</div>
                                    <div><span style="white-space:pre-wrap">      </span>.....</div>
                                    <div><span style="white-space:pre-wrap">      </span><span
class="m_-3953847647696378825m_7591727934642041896hljs-keyword"
                                        style="font-weight:bold">if</span>
                                      ( !check_blacklist(<span
                                        class="m_-3953847647696378825m_7591727934642041896hljs-string"
                                        style="color:rgb(136,0,0)">"globalblacklist"</span>)
                                      ) {</div>
                                    <div><span style="white-space:pre-wrap">              </span>xlog(<span
class="m_-3953847647696378825m_7591727934642041896hljs-string"
                                        style="color:rgb(136,0,0)">"L_NOTICE"</span>,<span
class="m_-3953847647696378825m_7591727934642041896hljs-string"
                                        style="color:rgb(136,0,0)">"[<span
class="m_-3953847647696378825m_7591727934642041896hljs-variable"
                                          style="color:rgb(188,96,96)">$fU</span>/<span
class="m_-3953847647696378825m_7591727934642041896hljs-variable"
                                          style="color:rgb(188,96,96)">$tU</span>/<span
class="m_-3953847647696378825m_7591727934642041896hljs-variable"
                                          style="color:rgb(188,96,96)">$ci</span>]
                                        [<span
                                          class="m_-3953847647696378825m_7591727934642041896hljs-variable"
                                          style="color:rgb(188,96,96)">$rm</span>]
                                        Destination [<span
                                          class="m_-3953847647696378825m_7591727934642041896hljs-variable"
                                          style="color:rgb(188,96,96)">$rU</span>]
                                        is not Allowed. Dropping
                                        call.\n"</span>);</div>
                                    <div><span style="white-space:pre-wrap">              </span>sl_send_reply(<span
class="m_-3953847647696378825m_7591727934642041896hljs-string"
                                        style="color:rgb(136,0,0)">"403"</span>,
                                      <span
                                        class="m_-3953847647696378825m_7591727934642041896hljs-string"
                                        style="color:rgb(136,0,0)">"Forbidden"</span>);</div>
                                    <div><span style="white-space:pre-wrap">              </span><span
class="m_-3953847647696378825m_7591727934642041896hljs-built_in"
                                        style="color:rgb(57,115,0)">exit</span>;</div>
                                    <div><span style="white-space:pre-wrap">      </span>}</div>
                                    <div><span style="white-space:pre-wrap">      </span><span
class="m_-3953847647696378825m_7591727934642041896hljs-keyword"
                                        style="font-weight:bold">else</span>
                                      {</div>
                                    <div><span style="white-space:pre-wrap">              </span>xlog(<span
class="m_-3953847647696378825m_7591727934642041896hljs-string"
                                        style="color:rgb(136,0,0)">"L_INFO"</span>,
                                      <span
                                        class="m_-3953847647696378825m_7591727934642041896hljs-string"
                                        style="color:rgb(136,0,0)">"[<span
class="m_-3953847647696378825m_7591727934642041896hljs-variable"
                                          style="color:rgb(188,96,96)">$fU</span>/<span
class="m_-3953847647696378825m_7591727934642041896hljs-variable"
                                          style="color:rgb(188,96,96)">$tU</span>/<span
class="m_-3953847647696378825m_7591727934642041896hljs-variable"
                                          style="color:rgb(188,96,96)">$ci</span>]
                                        [<span
                                          class="m_-3953847647696378825m_7591727934642041896hljs-variable"
                                          style="color:rgb(188,96,96)">$rm</span>]
                                        INBOUND CALL for [<span
                                          class="m_-3953847647696378825m_7591727934642041896hljs-variable"
                                          style="color:rgb(188,96,96)">$ru</span>]"</span>);</div>
                                    <div><span style="white-space:pre-wrap">              </span>route(10);</div>
                                    <div><span style="white-space:pre-wrap">              </span><span
class="m_-3953847647696378825m_7591727934642041896hljs-built_in"
                                        style="color:rgb(57,115,0)">exit</span>;</div>
                                    <div><span style="white-space:pre-wrap">      </span>}</div>
                                    <div><span style="white-space:pre-wrap">      </span>.....</div>
                                    <div>}</div>
                                  </div>
                                </div>
                                <br>
                              </div>
                              <div><br clear="all">
                                <div>
                                  <div dir="ltr"
                                    class="m_-3953847647696378825m_7591727934642041896gmail_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>
                  <br>
                  <div class="gmail_quote">
                    <div dir="ltr">On Mon, 1 Oct 2018 at 19:07,
                      Bogdan-Andrei Iancu <<a
                        href="mailto:bogdan@opensips.org"
                        target="_blank" moz-do-not-send="true">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>Hi
                          Abdul,<br>
                          <br>
                          IF I understand correctly, you use startup
                          route to load (from DB?) some blacklists into
                          localcache ?<br>
                          <br>
                          Regards,<br>
                        </tt>
                        <pre class="m_-3953847647696378825m_7591727934642041896m_2718947286626188160moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="m_-3953847647696378825m_7591727934642041896m_2718947286626188160moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank" moz-do-not-send="true">http://www.opensips-solutions.com</a>
OpenSIPS Bootcamp 2018
  <a class="m_-3953847647696378825m_7591727934642041896m_2718947286626188160moz-txt-link-freetext" href="http://opensips.org/training/OpenSIPS_Bootcamp_2018/" target="_blank" moz-do-not-send="true">http://opensips.org/training/OpenSIPS_Bootcamp_2018/</a>
</pre>
                        <div
class="m_-3953847647696378825m_7591727934642041896m_2718947286626188160moz-cite-prefix">On
                          09/28/2018 04:10 AM, Abdul Basit wrote:<br>
                        </div>
                        <blockquote type="cite">
                          <div dir="ltr">
                            <div>Hi team,</div>
                            <div><br>
                            </div>
                            <div>I have a opensips 2.4 deployed having 4
                              children and with mysql configured for
                              loading user blacklist to opensips local
                              cache on opensips startup.<br>
                            </div>
                            <div>Opensips work fine on filtering the
                              call based on user blacklist records
                              loaded into local cache. </div>
                            <div><br>
                            </div>
                            <div>While blacklist was growing upto 1.3m
                              records, opensips startup was taking ~60
                              sec on VM of 16GB RAM and 6 CPU.<br>
                            </div>
                            <div>I increased shared memory to <b>6144</b>
                              and package memory to <b>256.</b><br>
                            </div>
                            <div>Filter works fine here yet. Call load
                              is not that much only blacklist entries
                              are growing.</div>
                            <div><br>
                            </div>
                            <div>But now blacklist has grown to very
                              huge number, up to 10m records in mysql.
                              Opensips is not starting successfully and
                              service startup requests timeout after
                              huge CPU spikes while trying to populate
                              local cache from mysql. <br>
                            </div>
                            <div>I increased shared memory to <b>12288</b>
                              and package memory to <b>1024</b> but no
                              success yet.</div>
                            <div><br>
                            </div>
                            <div>I indexed mysql blacklist table but no
                              luck.</div>
                            <div><br>
                            </div>
                            <div>Please advise what settings I should
                              add to opensips for successful startup. </div>
                            <div><br>
                            </div>
                            <div>
                              <div dir="ltr"
class="m_-3953847647696378825m_7591727934642041896m_2718947286626188160gmail_signature"
                                data-smartmail="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>
                          </div>
                          <br>
                          <fieldset
class="m_-3953847647696378825m_7591727934642041896m_2718947286626188160mimeAttachmentHeader"></fieldset>
                          <br>
                          <pre>_______________________________________________
Users mailing list
<a class="m_-3953847647696378825m_7591727934642041896m_2718947286626188160moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank" moz-do-not-send="true">Users@lists.opensips.org</a>
<a class="m_-3953847647696378825m_7591727934642041896m_2718947286626188160moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank" moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
                        </blockquote>
                        <br>
                      </div>
                    </blockquote>
                  </div>
                </blockquote>
                <br>
              </div>
            </blockquote>
          </div>
          _______________________________________________<br>
          Users mailing list<br>
          <a href="mailto:Users@lists.opensips.org" target="_blank"
            moz-do-not-send="true">Users@lists.opensips.org</a><br>
          <a
            href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
            rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
        </blockquote>
      </div>
    </blockquote>
    <br>
  </body>
</html>