Patch adding hibernate_after option to ssl:connect and ssl:listen

Jeroen Koops koops.j@REDACTED
Wed Mar 2 23:03:21 CET 2011


On Wed, Mar 2, 2011 at 11:44 AM, Niclas Axelsson <burbas@REDACTED> 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


More information about the erlang-patches mailing list