<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<font face="monospace">HI Pete,<br>
<br>
Sorry for the late reply on this - if this is still a hot topic,
as a POC, try getting the rtpengine out of the picture and see how
the numbers look for replies.<br>
<br>
Regards,<br>
</font>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
<a class="moz-txt-link-freetext" href="https://www.siphub.com">https://www.siphub.com</a></pre>
<div class="moz-cite-prefix">On 15.04.2025 12:17, Pete Kelly wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAEWH9M-pFLTZL=Ah9Rqw7pgu-pHXpQbgOz7NQC57RoN0hrXGGQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr"> I’ll give script trace a try… </div>
<div dir="ltr"><br>
</div>
<div dir="ltr">
<div dir="ltr">loadmodule "proto_tcp.so"</div>
<div dir="ltr">modparam("proto_tcp", "tcp_parallel_handling", 1)</div>
<div dir="ltr">modparam("proto_tcp", "tcp_async", 1)</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">And </div>
<div dir="ltr"><br>
</div>
<div dir="ltr">
<div dir="ltr">tcp_connect_timeout=100</div>
<div dir="ltr">tcp_connection_lifetime = 3600</div>
<div dir="ltr">tcp_max_connections=512</div>
<div dir="ltr">tcp_max_msg_time=2</div>
<div dir="ltr">tcp_parallel_read_on_workers=yes</div>
<div dir="ltr">tcp_socket_backlog=10</div>
<div dir="ltr">tcp_keepcount=9</div>
<div dir="ltr">tcp_keepidle=120</div>
<div dir="ltr">tcp_keepinterval=60</div>
</div>
</div>
<div><br>
</div>
<div dir="ltr">Although I think it must come from the TCP level as
I have been doing some profiling, and I see things like 180 and
200 taking 10+ seconds, when there is nothing specified in the
reply routes.</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">It’s calling rtpengine_offer on the INVITE so I
wonder if that is causing backlogs - although the profiling
never seems to raise any issues on INVITE/BYE - it’s only on the
replies. Maybe related to transaction matching or something?</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">Pete</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On 14 Apr 2025 at 10:03:38,
Bogdan-Andrei Iancu <<a href="mailto:bogdan@opensips.org"
moz-do-not-send="true" class="moz-txt-link-freetext">bogdan@opensips.org</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"
type="cite">
<div>
<div>
<meta http-equiv="Content-Type"
content="text/html; charset=UTF-8">
</div>
<div> <font face="monospace">Hi Pete,<br>
<br>
Try the script_trace() function, to see if the delay
comes from the script level. If not, it means it comes
from the TCP layer (maybe related to the dispatching of
TCP cons between workers)<br>
<a class="moz-txt-link-freetext"
href="https://www.opensips.org/Documentation/Script-CoreFunctions-3-5#script_trace"
moz-do-not-send="true">https://www.opensips.org/Documentation/Script-CoreFunctions-3-5#script_trace</a><br>
<br>
BTW, what are the TCP settings for:<br>
<a class="moz-txt-link-freetext"
href="https://www.opensips.org/Documentation/Script-CoreParameters-3-5#tcp_parallel_read_on_workers"
moz-do-not-send="true">https://www.opensips.org/Documentation/Script-CoreParameters-3-5#tcp_parallel_read_on_workers</a><br>
<a class="moz-txt-link-freetext"
href="https://opensips.org/html/docs/modules/3.5.x/proto_tcp.html#idp5528016"
moz-do-not-send="true">https://opensips.org/html/docs/modules/3.5.x/proto_tcp.html#idp5528016</a><br>
<br>
Regards,<br>
</font>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext"
href="https://www.opensips-solutions.com"
moz-do-not-send="true">https://www.opensips-solutions.com</a>
<a class="moz-txt-link-freetext" href="https://www.siphub.com"
moz-do-not-send="true">https://www.siphub.com</a></pre>
<div class="moz-cite-prefix">On 10.04.2025 23:42, Pete
Kelly wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAEWH9M_Fz6jNN0HstsGSt1F_eTr4owGsmjA99x_OKc7LsoT4iw@mail.gmail.com">
<meta http-equiv="content-type"
content="text/html; charset=UTF-8">
<div dir="ltr">Hello all
<div><br>
</div>
<div dir="ltr">I am running some OpenSIPS proxies
which are talking to each other exclusively in TCP,
however when performing some (mild) load tests I am
seeing some strange behaviour from time to time,
which manifests itself as what looks like OpenSIPS
taking a long time to process SIP requests.</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">The most obvious issue I am seeing (and
confirmed by tcpdump) is when OpenSIPS receives an
invite but may take anything from 2-8 second to even
send the 100 Trying!</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">e.g.</div>
<div dir="ltr">
<p class="p1">T 2025/04/10 20:28:10.257283 <a
href="http://10.3.0.4:48665"
moz-do-not-send="true">10.3.0.4:48665</a> ->
<a href="http://10.3.0.12:5080"
moz-do-not-send="true">10.3.0.12:5080</a> [A]
#4826</p>
<p class="p1">INVITE sip:... SIP/2.0.</p>
<p class="p2">T 2025/04/10 20:28:12.644355 <a
href="http://10.3.0.12:5080"
moz-do-not-send="true">10.3.0.12:5080</a> ->
<a href="http://10.3.0.4:48665"
moz-do-not-send="true">10.3.0.4:48665</a> [AP]
#4955<br>
<span class="s1"></span></p>
<p class="p1">SIP/2.0 100 Giving it a try.</p>
</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">Is there an obvious route for me to
debug this behaviour to try and see where the
bottleneck may lie ? Can I see somewhere if all of
the tcp workers are in use for example and it is
waiting for a worker?</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">Pete</div>
<div dir="ltr"><br>
</div>
<div dir="ltr"><br>
</div>
<div dir="ltr"><br>
</div>
<div dir="ltr"><br>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated moz-txt-link-freetext"
href="mailto:Users@lists.opensips.org"
moz-do-not-send="true">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext"
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</div>
</div>
</blockquote>
</div>
</blockquote>
<br>
</body>
</html>