[OpenSIPS-Users] Failed INVITE tcp_send

Bogdan-Andrei Iancu bogdan at voice-system.ro
Tue Dec 22 09:53:31 CET 2009


Hi Brian,

opensipslist at encambio.com wrote:
> Hello Bogdan,
>
> An ven., déc 18, 2009, Bogdan-Andrei Iancu schrieb:
>   
>> It is not really a hack :) .... i tend to think this number vary
>>     
> >from OS to OS, from server to server .....like how slow the write
>   
>> ops take place - on some system is faster, on other is not.....
>>
>>     
> What I'm not understanding is the basic principle, why even a single
> retry is needed. I can imagine that with a slightly different design
> the topic of 'guessing' the right retry ceiling is completely
> unnecessary. Do you understand more about these TLS retries,
> and does it have to do with TCP primarily or code in the OpenSSL
> libraries?
>
>   
copied from the man page of SSL_write:

       If the underlying BIO is blocking, SSL_write() will only return, once
       the write operation has been finished or an error occurred, 
except when
       a renegotiation take place, in which case a SSL_ERROR_WANT_READ may
       occur.  This behaviour can be controlled with the SSL_MODE_AUTO_RETRY
       flag of the SSL_CTX_set_mode(3) call.




>> maybe we should simply increase the default number to cover also
>> the slow cases.
>>
>>     
> I disagree. You said yourself that 'this number varies' so lets do
> what we always do with such variables, and put it in the config.
>
> PSEUDOCODE
>
>   disable_tls       = 0
>   tls_method        = TLSv1
>   [...]
>   tls_maxretries    = 3200  # New variable
>
> Its not nice of course always stuffing up the config and OpenSIPS
> architecture with new variables, but if there's no design based
> solution to this then it seems better that way than hard coding
> such runtime variable deep into the core.
>   
There three things we try to make all happy:

1) easy to use (not so many cfg options)
2) cover all the cases - no need to "tune" for your system
3) be sure it works (no blocking of the write ops).

The questions is what should be the best approach for making all this 
happy ? :)

Regards,
Bogdan

-- 
Bogdan-Andrei Iancu
www.voice-system.ro




More information about the Users mailing list