<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hello,</p>
    <p>is the traffic sent over UDP?</p>
    <p>Can you look with netstat and see if the receiving queue for the
      socket of kamailio is buffering data?</p>
    <p>What is the operating system? Do you have contrack (kernel
      module) or selinux enabled in the system?</p>
    <p>Verify also that you don't have pike module enabled with a low
      rate limit.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div class="moz-cite-prefix">On 31.07.19 04:57, jay binks wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAO47HpdfX73OZPS=+dHjOvr9YJrwB9-MEusvYrFDZ7G3J8jHZg@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Hey all,
        <div>looking for a little help.</div>
        <div><br>
        </div>
        <div>I've been tracking an issue, where a number of SIP Messages
          ( typically INVITE ) are sent, but Kamailio only see one of
          them ( the last one).  I have verified that the messages are
          definitely received on the host, as verified with TCPDUMP, but
          the INVITES never hit the request route block. ( the very
          first thing is to log the message )
          <div>
            <div><br>
            </div>
            <div>What i've managed to find is, that if I increase worker
              children, the problem goes away.</div>
            <div><br>
            </div>
            <div>So I've got a problem, I think I've found the solution,
              but what I'm struggling with is how to monitor better, so
              I can be alerted to this in the future.</div>
            <div><br>
            </div>
            <div>I started by looking at "kamctl stats | grep drop"</div>
                "core:drop_replies = 14",<br>
                "core:drop_requests = 10577"</div>
          <div><br>
          </div>
          <div>however drop_requests seems to include explicit drops in
            my config.</div>
          <div>which I do for many reasons, but mainly bad UA or blocked
            IP's, so this dosnt seem to be what im after.</div>
          <div><br>
          </div>
          <div>I then went digging in the code ( often the best way to
            find things ).</div>
          in receive.c receive_msg() we find some conditions, where we
          drop the packet ( before calling request route ).</div>
        <div><br>
        </div>
        <div>right now im looking around line 251 at </div>
        <div>LM_DBG("dropping the received message\n"); </div>
        <div>goto error00;</div>
        <div><br>
        </div>
        Following error00 I see it calls STATS_RX_DROPS which increments
        stats->received_drops.
        <div><font face="SFMono-Regular, Consolas, Liberation Mono,
            Menlo, monospace" color="#24292e"><span style="font-size:12px;white-space:pre">
</span></font></div>
        This is where it gets fun, I cant find where received_drops is
        ever returned in the stats output.<br>
        <div>
          <div><br>
          </div>
          <div>I can see where -SIGUSR1 will trigger this to be dumped,
            if Kamailio is compiled with that option ( dosnt seem the
            debian packages are ).  however, what im seeking
            clarification on is, does this get reported in "kamctl
            stats"</div>
          <div><br>
          </div>
          <div>Am I just going crazy or is something not quite right
            here?</div>
          <div><br>
          </div>
          <div>TLDNR;  how do I monitor for Kamailio not having enough
            worker threads to process incoming messages.</div>
          <div><br>
          </div>
          <div>FYI I'm seeing about 50Mbps of incoming SIP on this box,
            and I do perform a decent amount of work on some message
            types.</div>
          <div><br>
          </div>
          <div>-- <br>
            <div dir="ltr" class="gmail_signature"
              data-smartmail="gmail_signature">Sincerely<br>
              <br>
              Jay</div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-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>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<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></pre>
  </body>
</html>