[erlang-patches] Re: Patch adding hibernate_after option to ssl:connect and ssl:listen

Niclas Axelsson <>
Fri Mar 4 10:57:43 CET 2011


On 03/02/2011 11:03 PM, Jeroen Koops wrote:
> On Wed, Mar 2, 2011 at 11:44 AM, Niclas Axelsson<>  wrote:
>
>    
>>   On 02/26/2011 05:23 PM, Jeroen Koops wrote:
>>
>> This patch:
>>
>>   https://github.com/jkoops/otp/commits/ssl_connection_hibernate
>>
>>   adds a { hibernate_after, int() } to ssl:connect and ssl:listen, and will
>> make the SSL connection process go into hibernation after the specified
>> number of milliseconds of inactivity. This is useful since a SSL connection
>> process normally uses hundreds of kilobytes of memory -- when hibernating
>> this is reduced to just a few hundred bytes, making systems with tens of
>> thousands simultaneous SSL connection feasible.
>>
>>   The patch has been discussed with Ingela Anderton Andin and Niclas
>> Axelsson, and I would like it to be considered for inclusion in an upcoming
>> OTP release.
>>
>>   --
>>
>>   Jeroen Koops
>>
>> Hi Jeroen,
>>
>> Your patch have now been tested and it seems to work :-). However, when we
>> are running dialyzer on 'pu' branch we receive an error due to a faulty
>> spec:
>>
>>
>>     - *ssl_connection.erl:292: * (extra_range)
>>     The specification for *ssl_connection:init/1* states that the function
>>     might also return *{'ok','abbreviated' | 'certify' | 'cipher' |
>>     'connection' |
>>     'hello',{'state',_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_}}
>>     * but the inferred return is *{'stop',_} |
>>     {'ok','hello',{'state','client' | 'server',{reference(),atom() | pid() |
>>     {_,_}},_,_,_,_,_,_,_,{'ssl_options',_,_,_,_,_,_,_,_,_,_,_,'undefined',_,_,_,_,_,_,_,_,_,_,_},_,{'connection_states',{_,_,_,_,_,_,_,_,_},{_,_,_,_,_,_,_,_,_},{_,_,_,_,_,_,_,_,_},{_,_,_,_,_,_,_,_,_}},[],<<>>,<<>>,{{_,_},{_,_}},[],{'session','undefined','undefined',_,'undefined','undefined','undefined','false','undefined'},_,atom(),'undefined','undefined','false','undefined','undefined',_,_,'undefined','undefined',reference(),'undefined',0,<<>>,'true',{'false','first'},'false',queue(),'false'},_}
>>     *
>>
>>
>> Do you have time to solve this?
>>
>> Regards,
>> Niclas Axelsson, Erlang/OTP
>>
>>      
>
> Hi Niclas,
>
> Please refetch
>
> git://github.com/jkoops/otp.git ssl_connection_hibernate
>
> the issue with the init-spec should be solved.
>
>
> Regards,
>
> Jeroen
>
>    
Thanks Jeroen,

Your branch have been refetched.

Regards,
Niclas Axelsson, Erlang/OTP


More information about the erlang-patches mailing list