<div dir="ltr">Hi Pawel!<div><br></div><div>In 18.2 you should have session cache size limited by 1000 by default — see <a href="https://github.com/erlang/otp/commit/42b8a29dbae1d626f32bc16dd81a129caf741138">https://github.com/erlang/otp/commit/42b8a29dbae1d626f32bc16dd81a129caf741138</a></div><div><br></div><div>Actually I have hit the trouble of many concurrent invalidators on 17.1, but the number of sessions was about 350000.</div><div>Also 18.2 has performance improvements, so you have to keep even more sessions to die of invalidators.</div><div><br></div><div>Try the following:</div><div> - Check if tables 'server_ssl_otp_session_cache' and 'client_ssl_otp_session_cache' owned by ssl_manager in 'ets:i()' output have more entries than configured limit.</div><div> - If limiting works well, set the limit to e.g. 50000. This should be sufficient for invalidator to finish its work in 60 seconds.</div><div> - Maybe you have other problem. Check ssl_manager's message_queue. It may be full of invalidation messages from closing sockets (in my tests closing 400000 sockets simultaneusly blocks the manager for several minutes). You can distinguish this from invalidator's effects by setting large lifetime to prevent invalidator from running.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 12, 2016 at 6:04 PM, Pawel Kraszewski <span dir="ltr"><<a href="mailto:pawel@kraszewscy.net" target="_blank">pawel@kraszewscy.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello!<br>
<br>
I'm struggling with SSL session cache. I've already upgraded to 18.2.1<br>
(fixed some of my problems), yet one thing bothers me:<br>
<br>
lib/ssl-7.2/src/ssl_manager.erl line 242/243<br>
<br>
SessionLifeTime = proplists:get_value(session_lifetime, Opts, ?'24H_in_sec'),<br>
<br>
Its OK.<br>
<br>
Line 251/252<br>
<br>
Timer = erlang:send_after(SessionLifeTime * 1000 + 5000, self(),<br>
validate_sessions),<br>
<br>
It's OK. Gives initial addidtional 5s backoff.<br>
<br>
And than suddenly line 383/384<br>
<br>
Timer = erlang:send_after(?SESSION_VALIDATION_INTERVAL, self(),<br>
validate_sessions),<br>
<br>
>From this time on SessionLifeTime "reload" is ignored and forced to 60s.<br>
<br>
I have potentially thousands of short-span SSL connections (simple<br>
JSON queries via SSL) and session cache grows quickly - even with<br>
session lifetime set to 10s.<br>
<br>
What gives?<br>
<span class="HOEnZb"><font color="#888888">--<br>
Paweł Kraszewski<br>
<a href="http://www.kraszewscy.net" rel="noreferrer" target="_blank">http://www.kraszewscy.net</a><br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><font face="'courier new', monospace">Danil Zagoskin | <a href="mailto:z@gosk.in" target="_blank">z@gosk.in</a></font></div></div></div>
</div>