[erlang-questions] ssl session cache

Pawel Kraszewski <>
Tue Jan 12 16:04:58 CET 2016


I'm struggling with SSL session cache. I've already upgraded to 18.2.1
(fixed some of my problems), yet one thing bothers me:

lib/ssl-7.2/src/ssl_manager.erl line 242/243

SessionLifeTime = proplists:get_value(session_lifetime, Opts, ?'24H_in_sec'),

Its OK.

Line 251/252

Timer = erlang:send_after(SessionLifeTime * 1000 + 5000, self(),

It's OK. Gives initial addidtional 5s backoff.

And than suddenly line 383/384

Timer = erlang:send_after(?SESSION_VALIDATION_INTERVAL, self(),

>From this time on SessionLifeTime "reload" is ignored and forced to 60s.

I have potentially thousands of short-span SSL connections (simple
JSON queries via SSL) and session cache grows quickly - even with
session lifetime set to 10s.

What gives?
 Paweł Kraszewski

More information about the erlang-questions mailing list