Hi all,
I’m running Asterisk 20.11.0 on Linux with PJSIP. About once a week, my SIP trunk with Etisalat stops responding, and both inbound/outbound calls fail.
When this happens, I see the following repeating error in the logs:
[Aug 25 08:59:30] ERROR[563033]: tcptls.c:306 ast_tcptls_server_root: TCP/TLS accept failed: Too many open files
After this, Asterisk is still running, but the trunk will not re-register, and calls don’t work. The only way to recover is to restart the SIP server (reboot or restart Asterisk).
My questions:
-
Is this caused by Asterisk hitting the Linux file descriptor limit (ulimit)?
-
Should I increase limits in
/etc/security/limits.conforsystemdservice file forasterisk? -
Is there a known memory or socket leak in
res_pjsipor WebSocket (I also use WebRTC clients)? -
Would switching the transport to UDP (instead of WS/TLS) for some endpoints help reduce open file usage?
Environment details:
-
Asterisk version: 20.11.0
-
Using PJSIP with WebSocket (WS) + UDP transports
-
Realtime config with PostgreSQL
-
Trunk: Etisalat (requires registration)
Has anyone experienced “Too many open files” errors leading to SIP registration failure? What’s the best practice to handle this—should I raise the open file limit, or investigate if Asterisk/WebRTC sessions are not closing properly?
Thanks in advance,
Manoj