[Kamailio-Users] lifetime and TCP connection timeout

Klaus Darilion klaus.mailinglists at pernau.at
Fri Oct 23 21:53:54 CEST 2009


Hi Aymeric!

I justed tested on one of my proxies (kamailio 1.5) and with the default 
setting (120s) it closes TCP connection always after 131 seconds - strange.

If I set to 30, the connection will be closed after 41 seconds.
If I set to 300, the connection will be closed after 311 seconds.

Looks like in my case there are always 11 seconds added (maybe some 
other timeouts before the connection enters the "idle" state in the TCP 
handler).

Anyway, that does not answer the problems you are experiencing.

regards
klaus

Klaus Darilion schrieb:
> 
> 
> Aymeric Moizard schrieb:
>>
>> Some additionnal information:
>>
>> I tried several value for tcp_connection_lifetime!
>>
>> tcp_connection_lifetime = 120  -> close TCP conn after 50 seconds
>> tcp_connection_lifetime = 300  -> close TCP conn after 90 seconds
>> tcp_connection_lifetime = 600  -> close TCP conn after 160 seconds
>>
>> Do I have "tick" issue? Any idea?
> 
> Are you using a non-standard OS? kernel? hardware?
> 
> Is the clock running correct on your OS?
> 
>> I think I'm close to find either a bug or an issue with my kernel?
>>
>> I got a timer running a route[] for statistics computation, in
>> case that would change something?
> 
> Is the timer route executed correctly or is it also called too often?
> 
> klaus
> 
>> I'm using rtimer module: could this have an impact?
>>
>> Aymeric MOIZARD / ANTISIP
>> amsip - http://www.antisip.com
>> osip2 - http://www.osip.org
>> eXosip2 - http://savannah.nongnu.org/projects/exosip/
>>
>>
>> On Fri, 23 Oct 2009, Klaus Darilion wrote:
>>
>>> Hi Aymeric!
>>>
>>> Kamailio does not support SIP outbound. It should close TCP 
>>> connection after the timeout. The timeout can be specified with 
>>> http://www.kamailio.org/dokuwiki/doku.php/core-cookbook:1.5.x#tcp_connection_lifetime 
>>>
>>>
>>> So, do I get it right that this does not work (TCP connection closed 
>>> after 50 seconds by Kamailio although the default value is 120 seconds)?
>>>
>>> (For outbound support probably the default value should be increased).
>>>
>>> Further, usually the lifetime should be extended to the value of the 
>>> registration expiration. This can be done by using
>>> http://www.kamailio.org/docs/modules/1.5.x/registrar.html#id2477171
>>>
>>> regards
>>> klaus
>>>
>>> Aymeric Moizard schrieb:
>>>>
>>>>
>>>> On Fri, 23 Oct 2009, Iñaki Baz Castillo wrote:
>>>>
>>>>> El Viernes, 23 de Octubre de 2009, Aymeric Moizard escribió:
>>>>>> Hi all,
>>>>>>
>>>>>> I'm working on improving my TCP support and go some issue
>>>>>> related to TCP connections and lifetime/persistence.
>>>>>
>>>>> Are you doing that in Kamailio's TM module?
>>>>> Please take into account that for Kamailio next version SIP-Router 
>>>>> TM module
>>>>> will be used, which has received LOT of love for TCP (i.e: non 
>>>>> blocking).
>>>>
>>>> Sorry that I missed to put the version of kamailio: I'm using branch 
>>>> 1.5
>>>> svnversion gives 5868M
>>>> ChangeLog last line is:
>>>> ===================== 2009-04-29 Kamailio v1.5.1 released 
>>>> =====================
>>>>
>>>> Seems like you are misunderstooding me: I'm working on my SIP stacks 
>>>> against kamailio with no change. I'm not working "on" the tm module.
>>>>
>>>> Tks,
>>>> Aymeric MOIZARD / ANTISIP
>>>> amsip - http://www.antisip.com
>>>> osip2 - http://www.osip.org
>>>> eXosip2 - http://savannah.nongnu.org/projects/exosip/
>>>>
>>>>
>>>>> -- 
>>>>> Iñaki Baz Castillo <ibc at aliax.net>
>>>>>
>>>>> _______________________________________________
>>>>> Kamailio (OpenSER) - Users mailing list
>>>>> Users at lists.kamailio.org
>>>>> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
>>>>> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>>>>>
>>>>
>>>> ------------------------------------------------------------------------ 
>>>>
>>>>
>>>> _______________________________________________
>>>> Kamailio (OpenSER) - Users mailing list
>>>> Users at lists.kamailio.org
>>>> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
>>>> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>>>
> 
> _______________________________________________
> Kamailio (OpenSER) - Users mailing list
> Users at lists.kamailio.org
> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users



More information about the Users mailing list