Hello,
On 7/28/11 11:02 PM, Iñaki Baz Castillo wrote:
2011/7/28 Iñaki Baz Castilloibc@aliax.net:
2011/7/28 Klaus Darilionklaus.mailinglists@pernau.at:
AFAIK this single timer process is blocked as well. If this single time request is used for other periodically executed routes too, than those might be affected as well.
Hi, yes, I suppose that the timer process would also block (fully normal if I do a blocking call there). But reading the doc about "It can create new timer processes" maybe it creates N timer processes to balance the work.
Well, I assume such "magic" (automatically creating more processes) does not occur. So, assuming that the route block called by a timer (RTimer module) performs a blocking action, then it can be a bottleneck if there is heavy traffic. Imagine this case:
- For each received INVITE Kamailio sends some data via Mqueue module.
- RTimer module has a timer running each second calling route[N].
- route[N] invokes a blocking call (i.e. an HTTP request).
If case of high INVITE traffic, the kamailio process running the timer would be a real bottleneck, am I right?
I assume you want consume all items in a queue at once (if there are many -- can be done using while to fetch from queue) and then sleep for 1 second (i.e., timer to execute route block each second).
Indeed, there is no process created auto-magically, but if you expect lot of traffic for blocking ops, you can create more rtimer processes that will execute same route block which consumes mqueue items. Creating many rtimer processes is by setting 'timer' parameter more than one with different name attribute and mode=1, then set also many exec parameters accordingly.
Cheers, Daniel