Hi,
My Log filled to 20G overnight with these
Mar 18 09:59:44 sipprod /usr/local/sbin/kamailio[26157]: ERROR: <core> [tcp_main.c:4049]: WARNING: handle_new_connect: error while accepting connection(24): Too many open files Mar 18 09:59:44 sipprod /usr/local/sbin/kamailio[26157]: ERROR: <core> [tcp_main.c:4049]: WARNING: handle_new_connect: error while accepting connection(24): Too many open files Mar 18 09:59:44 sipprod /usr/local/sbin/kamailio[26157]: ERROR: <core> [tcp_main.c:4049]: WARNING: handle_new_connect: error while accepting connection(24): Too many open files^C
I looked at the code segment it is here where it is logging.
new_sock=accept(si->socket, &(su.s), &su_len); if (unlikely(new_sock==-1)){ if ((errno==EAGAIN)||(errno==EWOULDBLOCK)) return 0; LOG(L_ERR, "WARNING: handle_new_connect: error while accepting" " connection(%d): %s\n", errno, strerror(errno)); return -1; }
I am using 3.3.x
Is this an issue with Kamailio or something else?
Appreciate any help regarding this matter
Krish Kura
Le 2013-03-18 18:12, Krishna Kurapati a écrit :
My Log filled to 20G overnight with these
Mar 18 09:59:44 sipprod /usr/local/sbin/kamailio[26157]: ERROR: <core> [tcp_main.c:4049]: WARNING: handle_new_connect: error while accepting connection(24): Too many open files Mar 18 09:59:44 sipprod /usr/local/sbin/kamailio[26157]: ERROR: <core> [tcp_main.c:4049]: WARNING: handle_new_connect: error while accepting connection(24): Too many open files Mar 18 09:59:44 sipprod /usr/local/sbin/kamailio[26157]: ERROR: <core> [tcp_main.c:4049]: WARNING: handle_new_connect: error while accepting connection(24): Too many open files^C
[...]
Is this an issue with Kamailio or something else?
Yes it's an issue with Kamailio. Any daemon should throttle accept() calls when encountering file descriptor exhaustion.
That does not mean that the exhaustion situation you encountered was normal in the first place, but at least Kamailio should react correctly. Filling the logs or busy-looping are not acceptable.
Simon
These are warning messages, if you want better protection of the log size, lower debug level.
For tuning of tcp, read doc/tcp_tunning.txt
Probably you have a low value for open fds, look at 'ulimit -n'.
Cheers, Daniel
On 3/18/13 6:42 PM, Simon Perreault wrote:
Le 2013-03-18 18:12, Krishna Kurapati a écrit :
My Log filled to 20G overnight with these
Mar 18 09:59:44 sipprod /usr/local/sbin/kamailio[26157]: ERROR: <core> [tcp_main.c:4049]: WARNING: handle_new_connect: error while accepting connection(24): Too many open files Mar 18 09:59:44 sipprod /usr/local/sbin/kamailio[26157]: ERROR: <core> [tcp_main.c:4049]: WARNING: handle_new_connect: error while accepting connection(24): Too many open files Mar 18 09:59:44 sipprod /usr/local/sbin/kamailio[26157]: ERROR: <core> [tcp_main.c:4049]: WARNING: handle_new_connect: error while accepting connection(24): Too many open files^C
[...]
Is this an issue with Kamailio or something else?
Yes it's an issue with Kamailio. Any daemon should throttle accept() calls when encountering file descriptor exhaustion.
That does not mean that the exhaustion situation you encountered was normal in the first place, but at least Kamailio should react correctly. Filling the logs or busy-looping are not acceptable.
Simon
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On 3/18/13 6:42 PM, Simon Perreault wrote:
Le 2013-03-18 18:12, Krishna Kurapati a écrit :
My Log filled to 20G overnight with these
Mar 18 09:59:44 sipprod /usr/local/sbin/kamailio[26157]: ERROR: <core> [tcp_main.c:4049]: WARNING: handle_new_connect: error while accepting connection(24): Too many open files Mar 18 09:59:44 sipprod /usr/local/sbin/kamailio[26157]: ERROR: <core> [tcp_main.c:4049]: WARNING: handle_new_connect: error while accepting connection(24): Too many open files Mar 18 09:59:44 sipprod /usr/local/sbin/kamailio[26157]: ERROR: <core> [tcp_main.c:4049]: WARNING: handle_new_connect: error while accepting connection(24): Too many open files^C
[...]
Is this an issue with Kamailio or something else?
Yes it's an issue with Kamailio. Any daemon should throttle accept() calls when encountering file descriptor exhaustion.
That does not mean that the exhaustion situation you encountered was normal in the first place, but at least Kamailio should react correctly. Filling the logs or busy-looping are not acceptable.
Just to add (besides lowering debug level in kamailio config as said in previous email), latest versions of syslog apps have limits for syslog file size. That should be used as protection anyhow.
A contribution on enhancing the way kamailio logs in such situation is welcome, of course.
Cheers, Daniel