HI Pete,

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.

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
  https://www.siphub.com

On 15.04.2025 12:17, Pete Kelly wrote:
I’ll give script trace a try…

loadmodule "proto_tcp.so"
modparam("proto_tcp", "tcp_parallel_handling", 1)
modparam("proto_tcp", "tcp_async", 1)

And

tcp_connect_timeout=100
tcp_connection_lifetime = 3600
tcp_max_connections=512
tcp_max_msg_time=2
tcp_parallel_read_on_workers=yes
tcp_socket_backlog=10
tcp_keepcount=9
tcp_keepidle=120
tcp_keepinterval=60

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.

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?

Pete

On 14 Apr 2025 at 10:03:38, Bogdan-Andrei Iancu <[email protected]> wrote:
Hi Pete,

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)
https://www.opensips.org/Documentation/Script-CoreFunctions-3-5#script_trace

BTW, what are the TCP settings for:
https://www.opensips.org/Documentation/Script-CoreParameters-3-5#tcp_parallel_read_on_workers
https://opensips.org/html/docs/modules/3.5.x/proto_tcp.html#idp5528016

Regards,
Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com
   https://www.siphub.com
On 10.04.2025 23:42, Pete Kelly wrote:
Hello all

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.

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!

e.g.

T 2025/04/10 20:28:10.257283 10.3.0.4:48665 <http://10.3.0.4:48665> -> 10.3.0.12:5080 <http://10.3.0.12:5080> [A] #4826

INVITE sip:... SIP/2.0.

T 2025/04/10 20:28:12.644355 10.3.0.12:5080 <http://10.3.0.12:5080> -> 10.3.0.4:48665 <http://10.3.0.4:48665> [AP] #4955

SIP/2.0 100 Giving it a try.


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?

Pete





_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to