Hello,

On 20/02/14 18:32, Uri Shacked wrote:

Hi, 

Following my issue with the above....

1.    Is there a way to see if a worker (child) is processing a transaction for too long (let’s say 2-3 sec)?


you can get a log message when execution of an action is slow, see:

http://www.kamailio.org/wiki/cookbooks/4.1.x/core#latency_limit_action

2.    Is there an option to see if the DB connection is alive? (I am familiar with db_mysql options)


Probably you can use OS tools like netstat to see active connections in the system.

3.    If all workers are stuck on this "long" transaction, is there a Q for the new INVITES? Can I see how many are there?


The queu is in the OS socket buffer, but I am not aware of how to see what's there.

 

What I was experiencing is that when my DB was very slow, kamailio crashed after a while....


Still haven't had time to get to look at it more close. It should not crash, but could be also from the library, like killing it when something is stuck too long. Overall, it should be good not to get long queries, even if it is asynchronous, it will fill up at some point even there (e.g., by number of threads or memory) -- these remarks are not specific for kamailio, but in general.

 

I will configure db_mysql to ping every 30 sec and timeout after 1 sec.

Still, it can create a 3 sec delay for transactions.

 

 

Any one has an idea?

 

Using the ASYNC module can help here? Does it free the worker to deal with new requests?

Yes, it will get in another process to handle the actions after t_suspend() and the sip worker will get to next packet from the network.

Cheers,
Daniel

 

BR,

Uri



_______________________________________________
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

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda