[erlang-questions] Memory leak in SSL

Ingela Andin <>
Tue Aug 8 15:55:21 CEST 2017


Hi!

Depending on the version of the ssl application you may also set these
values. I guess you have an older version as they default to 1000.

>From doc:

*"session_cache_client_max = integer() <optional>*

Limits the growth of the clients session cache, that is how many sessions
towards servers that are cached to be used by new client connections. If
the maximum number of sessions is reached, the current cache entries will
be invalidated regardless of their remaining lifetime. Defaults to 1000.
* session_cache_server_max = integer() <optional>*

Limits the growth of the servers session cache, that is how many client
sessions are cached by the server. If the maximum number of sessions is
reached, the current cache entries will be invalidated regardless of their
remaining lifetime. Defaults to 1000."


Regards Ingela Erlang/OTP Team - Ericsson AB




2017-08-08 11:25 GMT+02:00 Dmitry Kolesnikov <>:

> Hello,
>
> Have you tried to disable reuse of ssl sessions?
> {ssl_options, [{reuse_sessions, false}]}
>
> And reduce the session time
> -ssl session_lifetime 120
>
> Best Regards,
> Dmitry
>
> > On 8 Aug 2017, at 11.59, Max Treskin <> wrote:
> >
> > Hello,
> >
> > I have two different HTTPS-servers (different purposes, code, etc) built
> on top of cowboy/ranch, and both have memory leaks.
> > ETS table server_ssl_otp_session_cache has millions of records just
> after hours of work and consumes gigabytes of RAM.
> > What should I do to eliminate this? Is it bug or intended behaviour?
> >
> > Thanks
> >
> >
> > _______________________________________________
> > erlang-questions mailing list
> > 
> > http://erlang.org/mailman/listinfo/erlang-questions
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170808/978dbb27/attachment.html>


More information about the erlang-questions mailing list