Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSL application configuration #1335

Closed
mmzeeman opened this issue Jul 1, 2016 · 5 comments · Fixed by #2324
Closed

SSL application configuration #1335

mmzeeman opened this issue Jul 1, 2016 · 5 comments · Fixed by #2324

Comments

@mmzeeman
Copy link
Member

mmzeeman commented Jul 1, 2016

When you have a busy site with lots of ssl connections the default configuration options of the ssl session manager don't really work. It may keeps ssl sessions for 24 hours, but has just room for 1000 sessions in the table. When the table is full, all sessions in the table are invalidated. When you have a busy site you see this happen often and the ssl_manager's mailbox is filled with hundreds of messages.

Something needs to be written about this somewhere, and the erlang.config.in needs good ssl session defaults which works for web-servers. Maybe something like this?

%%% Ssl application defaults. 
 {ssl, [
  {session_cache_server_max, 20000}, % Increase when you have a lot of connections 
  {session_lifetime, 300}, % 5 minutes (in seconds).
  {ssl_pem_cache_clean, 300000} % Clean pem cache every 5 minutes. (in milliseconds)
 ]},
@arjan
Copy link
Member

arjan commented Jul 1, 2016

Yes it could go in our erlang.config, right?

@mmzeeman
Copy link
Member Author

mmzeeman commented Jul 1, 2016

Yes, that is where it should end up.

Should we add a warning message for when these settings are not changed?

@mmzeeman
Copy link
Member Author

mmzeeman commented Jul 1, 2016

The defaults NGINX uses look sensible to me. About 20000 entries and 5 minute session expiration time. It mentions that 4000 sessions take up 1 Mb of memory.

@ddeboer
Copy link
Member

ddeboer commented Jul 2, 2016

Agreed on the NGINX defaults. @mmzeeman Please open a PR with these lines added to erlang.config.in (or zotonic.config.in?). Can you also add instructions on how to change this to http://zotonic.com/docs/latest/ref/modules/mod_ssl.html?

@ddeboer
Copy link
Member

ddeboer commented Sep 22, 2016

@mmzeeman Has this issue been satisfactorily fixed in #1337?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants