Hello,


On 18.07.18 06:41, Sergey Safarov wrote:
One my server with perl external script time to time is stopping processing SIP messages. Perl script make calls to kamailio database on mysql.

I have found this in logs

DEBUG: <core> [core/io_wait.h:380]: io_watch_add(): DBG: io_watch_add(0x56427eb40c40, 495, 2, 0x7f1a9f9ba408), fd_no=33
DEBUG: <core> [core/io_wait.h:602]: io_watch_del(): DBG: io_watch_del (0x56427eb40c40, 495, -1, 0x0) fd_no=34 called
DEBUG: <core> [core/tcp_main.c:4196]: handle_tcpconn_ev(): sending to child, events 1
DEBUG: <core> [core/tcp_main.c:3871]: send2child(): WARNING: no free tcp receiver, connection passed to the least busy one (56)
DEBUG: <core> [core/tcp_main.c:3875]: send2child(): selected tcp worker 4 20(24) for activity on [tcp:0.0.0.0:81], 0x7f1a9f9ba408

And no next messages.

How get info what is load on "tcp receiver". This host in dev mode and handles not more 5 devices.

this messages are printed when all tcp workers are assigned to handle traffic on a tcp connection. They are harmless if there is a lot of traffic on many tcp connections, but if you say the traffic is low, then the tcp workers are blocked in some operations, likely the database query.

You can use benchmark module or play with latency* core parameters in order to detect what action in config takes very long time to execute.

You can also increase the value for tcp_children global parameter.

Cheers,
Daniel
-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference -- www.kamailioworld.com