<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><tt>Hi, Steve!</tt></p>
<p><tt>The transport layer was heavily refactored roughly three years
ago, see [1], [2] and [3] for the relevant commits which,
indeed, bumped the default connect timeout down a lot, to a much
lower value (10s -> 100ms). Although 100ms might seem
unnecessary (it's async! let it sleep as long as it wants!),
keep in mind that the TLS support isn't async at all, yet it
will also make use of the same, default "tcp_connect_timeout" -
a 10s default here is quite bad for high traffic volume TLS
proxies which often need to open up lots of TCP/TLS connections.<br>
</tt></p>
<p><tt>All in all, the "tcp_connect_timeout" should not get ignored
at all. The "tcp_async_local_connect_timeout" [4] is the first
one that hits, after which the connect waiting will be performed
by a non-TCP worker, up to "tcp_connect_timeout" milliseconds.
If it doesn't behave like this, let us know, and we'll look into
it more.<br>
</tt></p>
<p><tt>Best regards,</tt><br>
<br>
<tt><tt>[1]: <a class="moz-txt-link-freetext" href="https://github.com/OpenSIPS/opensips/commit/b343ca1c">https://github.com/OpenSIPS/opensips/commit/b343ca1c</a></tt><br>
[2]: <a class="moz-txt-link-freetext" href="https://github.com/OpenSIPS/opensips/commit/78c84620">https://github.com/OpenSIPS/opensips/commit/78c84620</a></tt><br>
<tt><tt>[3]: <a class="moz-txt-link-freetext" href="https://github.com/OpenSIPS/opensips/commit/11aedc6">https://github.com/OpenSIPS/opensips/commit/11aedc6</a><br>
[4]:
<a class="moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/2.4.x/proto_tcp.html#idp5544000">http://www.opensips.org/html/docs/modules/2.4.x/proto_tcp.html#idp5544000</a><br>
</tt></tt></p>
<pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<div class="moz-cite-prefix">On 08.01.2018 22:38, Steve Brisson
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:1D7B55AB4979E6498B3AC325C40E84360102C1253D@ORD2MBX02F.mex05.mlsrvr.com">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I've run into some issues related to
tcp_async and tcp/tls timeouts since upgrading opensips from
v1.8 to v2.3.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Based on my v1.8 config, I had the
tcp_connect_timeout set to 3 secs but this gets ignored in
v2.3 because tcp_async is enabled by default. As a result,
calls made from a local opensips endpoint to a remote
registered endpoint (through a cisco vcs) were failing. I then
noticed that the tcp/tls timeouts were aggressively reduced
from 10-30s to 100ms by default with the tcp_async feature.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">My main questions are:<o:p></o:p></p>
<p class="MsoNormal">- How is the tcp_async feature supposed to
function if the tcp_async_local_connect_timeout expires? The
code seems to imply that the socket gets put onto a tcp main
thread and handled.<o:p></o:p></p>
<p class="MsoNormal">- 100ms seems pretty short as a default for
these timeouts, especially tls. Does a timeout result in the
sip request getting cancelled or is there still some
processing that can occur after because of handling on the tcp
main thread.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">In short, I'm a confused about what the
tcp_async feature does and how the timeouts should be set. Any
explanations would be greatly appreciated.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks for your time.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">steve<o:p></o:p></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>