<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hello,</p>
    <p>can you open an issue on bug tracker in order not to forget this
      one and approach it once the time allows:</p>
    <p>  - <a class="moz-txt-link-freetext" href="https://github.com/kamailio/kamailio/issues">https://github.com/kamailio/kamailio/issues</a></p>
    <p>I am mostly out of office these days, checking stuff
      sporadically, so it may take a bit of time to get to it.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 18.12.17 18:59, Juan Priotti wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAD=9vpjuT8Fp3VE7V3O7p7HWCwZhr3zzhxz45x41GY58V+VCzw@mail.gmail.com">
      <div dir="ltr">
        <div>
          <div>
            <div>Hi,<br>
              I'm making some tests with pipelimit module and when
              changing the time interval the limit gets changed in a way
              that it's multiplied by the time interval. For example if
              I use a time interval of 1 second and a limit of 20 (if
              (!pl_check("$si", "TAILDROP", "20"))) the module start
              limiting right after the traffic gets over 20 CPS. But if
              I change the time interval to 3 seconds, the module starts
              limiting the traffic right after 60 CPS. This is my
              configuration:<br>
              <br>
              # ----- pipelimit params-----<br>
              modparam("pipelimit", "timer_interval", 3)<br>
              modparam("pipelimit", "hash_size", 10)<br>
              modparam("pipelimit", "db_url", DBURL)<br>
              modparam("pipelimit", "reply_code", 503)<br>
              modparam("pipelimit", "reply_reason", "Limiting")<br>
              <br>
              ...<br>
              ...<br>
              ...<br>
              <br>
              request_route {</div>
            <div>...</div>
            <div>...</div>
            <div>        if(is_method("INVITE")) {<br>
                              $var(limit) = 20;<br>
                              if (!pl_check("$si", "TAILDROP",
              "$var(limit)")) {<br>
                              xlog("L_INFO", "[$ci] $si - Limiting
              INVITE using pipe $var(limit) req/sec\n");<br>
                              pl_drop();<br>
                              exit;<br>
                              }<br>
              .....<br>
              .....<br>
              .....<br>
                      }<br>
              }<br>
              <br>
              <br>
              Checking the source for pipelimit module (<a
href="https://github.com/kamailio/kamailio/blob/master/src/modules/pipelimit/pipelimit.c"
                moz-do-not-send="true">https://github.com/kamailio/kamailio/blob/master/src/modules/pipelimit/pipelimit.c</a>)
              I see that for taildrop it's checking for the limit times
              the time_interval:<br>
              <br>
              case PIPE_ALGO_TAILDROP:<br>
              ret = (pipe->counter <= pipe->limit *
              timer_interval) ? 1 : -1;<br>
              break;<br>
              <br>
            </div>
            I've made a change eliminating the time_interval (set it to
            1) from that check and after that I've got the limit working
            OK, and the traffic gets drop right after it's over the
            limit (20 cps) using any time_interval. Is there some issue
            with the timer for the check not being updated by the module
            settings (timer_interval)? I'm using kamailio 4.4 and I've
            also tested it in kamailio 4.3 and 5.1 with same results.<br>
          </div>
          Thanks in advance,<br>
          <br>
        </div>
        Juan Priotti<br>
        <div>
          <div>
            <div><br>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - May 14-16, 2018 - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
  </body>
</html>