<div dir="ltr">Hello,<div><br></div><div>It works. But Ingela suggested that I should set <span style="font-size:12.8px">session_lifetime option to ssl which by default limit to 24h.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">I wonder where should I put this option?</span></div><div><span style="font-size:12.8px"><br></span></div><div><div style=""><span style="font-size:12.8px">% <a href="http://erlang.mk">erlang.mk</a> make file for application</span></div><div style=""><span style="font-size:12.8px"><br></span></div><div style=""><span style="font-size:12.8px">{application, ws_user, [</span></div><div style=""><span style="font-size:12.8px"><span class="" style="white-space:pre">    </span>{description, "Cowboy websocket for users."},</span></div><div style=""><span style="font-size:12.8px"><span class="" style="white-space:pre">     </span>{vsn, "1"},</span></div><div style=""><span style="font-size:12.8px"><span class="" style="white-space:pre">       </span>{modules, []},</span></div><div style=""><span style="font-size:12.8px"><span class="" style="white-space:pre">      </span>{registered, [ws_user_sup]},</span></div><div style=""><span style="font-size:12.8px"><span class="" style="white-space:pre">        </span>{applications, [</span></div><div style=""><span style="font-size:12.8px"><span class="" style="white-space:pre">            </span>kernel,</span></div><div style=""><span style="font-size:12.8px"><span class="" style="white-space:pre">             </span>stdlib,</span></div><div style=""><span style="font-size:12.8px"><span class="" style="white-space:pre">             </span>cowboy,</span></div><div style=""><span style="font-size:12.8px"><span class="" style="white-space:pre">             </span>ssl,</span></div><div style=""><span style="font-size:12.8px"><span class="" style="white-space:pre">                </span>erlydtl,</span></div><div style=""><span style="font-size:12.8px"><span class="" style="white-space:pre">            </span>xmerl</span></div><div style=""><span style="font-size:12.8px"><span class="" style="white-space:pre">       </span>]},</span></div><div style=""><span style="font-size:12.8px"><span class="" style="white-space:pre"> </span>{mod, {ws_user_app, []}},</span></div><div style=""><span style="font-size:12.8px"><span class="" style="white-space:pre">   </span>{env, []}</span></div><div style=""><span style="font-size:12.8px">]}.</span></div><div style="font-size:12.8px"><br></div></div><div style="font-size:12.8px">Thanks, Sethy</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 21, 2015 at 2:11 PM, Loïc Hoguin <span dir="ltr"><<a href="mailto:essen@ninenines.eu" target="_blank">essen@ninenines.eu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You need the dev library of OpenSSL when you compile Erlang, otherwise crypto, public_key and ssl won't be available.<br>
<br>
On 09/21/2015 09:04 AM, Sereysethy TOUCH wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
I use <a href="http://erlang.mk" rel="noreferrer" target="_blank">erlang.mk</a> <<a href="http://erlang.mk" rel="noreferrer" target="_blank">http://erlang.mk</a>> to build my application. After I<span class=""><br>
successfully built erlang from maint branch using kerl, when I compiled<br>
my application, I got this error:<br>
<br>
My erlang is Erlang/OTP 18 [erts-7.0.3] [source-5991161] [64-bit]<br>
[smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]<br>
<br>
Failed to solve release:<br>
<br>
  Dependency ssl is specified as a dependency but is not reachable by<br>
the system.<br>
<br>
<br>
Any ideas?<br>
<br>
<br>
On Sun, Sep 20, 2015 at 11:18 PM, Loïc Hoguin <<a href="mailto:essen@ninenines.eu" target="_blank">essen@ninenines.eu</a><br></span><span class="">
<mailto:<a href="mailto:essen@ninenines.eu" target="_blank">essen@ninenines.eu</a>>> wrote:<br>
<br>
  Â  As far as I understand, 18.1 will be released very soon, maybe this<br>
  Â  week, so perhaps your problems will be gone in a few days without<br>
  Â  having to do anything. :-)<br>
<br>
  Â  On 09/20/2015 06:04 PM, Sereysethy TOUCH wrote:<br>
<br></span>
  Â  Â  Â  FYI, I use <a href="http://erlang.mk" rel="noreferrer" target="_blank">erlang.mk</a> <<a href="http://erlang.mk" rel="noreferrer" target="_blank">http://erlang.mk</a>> <<a href="http://erlang.mk" rel="noreferrer" target="_blank">http://erlang.mk</a>> to<span class=""><br>
  Â  Â  Â  build my application.<br>
<br>
  Â  Â  Â  On Sun, Sep 20, 2015 at 10:53 PM, Sereysethy TOUCH<br>
  Â  Â  Â  <<a href="mailto:touch.sereysethy@gmail.com" target="_blank">touch.sereysethy@gmail.com</a> <mailto:<a href="mailto:touch.sereysethy@gmail.com" target="_blank">touch.sereysethy@gmail.com</a>><br></span>
  Â  Â  Â  <mailto:<a href="mailto:touch.sereysethy@gmail.com" target="_blank">touch.sereysethy@gmail.com</a><span class=""><br>
  Â  Â  Â  <mailto:<a href="mailto:touch.sereysethy@gmail.com" target="_blank">touch.sereysethy@gmail.com</a>>>> wrote:<br>
<br>
  Â  Â  Â  Â  Â  Â Hello,<br>
<br>
  Â  Â  Â  Â  Â  Â When do you think a new version erlang 18 will be released<br>
  Â  Â  Â  which<br>
  Â  Â  Â  Â  Â  Â fixes this problem?<br>
<br>
  Â  Â  Â  Â  Â  Â So you suggest that I should build the maint branch? And<br>
  Â  Â  Â  what to do<br>
  Â  Â  Â  Â  Â  Â with erlang installed on my server?<br>
<br>
  Â  Â  Â  Â  Â  Â I will stick with shell. No gui.<br>
<br>
  Â  Â  Â  Â  Â  Â Sorry I seem confused. Need more helps here :-)<br>
<br>
<br>
<br>
  Â  Â  Â  Â  Â  Â On Sunday, 20 September 2015, Jesper Louis Andersen<br>
  Â  Â  Â  Â  Â  Â <<a href="mailto:jesper.louis.andersen@gmail.com" target="_blank">jesper.louis.andersen@gmail.com</a><br>
  Â  Â  Â  <mailto:<a href="mailto:jesper.louis.andersen@gmail.com" target="_blank">jesper.louis.andersen@gmail.com</a>><br></span>
  Â  Â  Â  Â  Â  Â <mailto:<a href="mailto:jesper.louis.andersen@gmail.com" target="_blank">jesper.louis.andersen@gmail.com</a><span class=""><br>
  Â  Â  Â  <mailto:<a href="mailto:jesper.louis.andersen@gmail.com" target="_blank">jesper.louis.andersen@gmail.com</a>>>> wrote:<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â Ingela suggested you try building the "maint" branch,<br>
  Â  Â  Â  which has<br>
  Â  Â  Â  Â  Â  Â  Â  Â a fix for the session cache problem (by Ingela :)<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â simply git pull <a href="https://github.com/erlang/otp" rel="noreferrer" target="_blank">https://github.com/erlang/otp</a><br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â checkout the maint branch<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â build the result. Alterantively, the 'kerl' application<br>
  Â  Â  Â  (also on<br>
  Â  Â  Â  Â  Â  Â  Â  Â github) can build Erlang. It has an experimental<br>
  Â  Â  Â  git-mode which<br>
  Â  Â  Â  Â  Â  Â  Â  Â may be useful here.<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â I think you are looking at the SSL session cache problem.<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â As for observer: observer:start() will start it:<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â * You need wx in your Erlang installation, it is a GUI<br>
  Â  Â  Â  application<br>
  Â  Â  Â  Â  Â  Â  Â  Â * You need something which can run wx applications. It is<br>
  Â  Â  Â  Â  Â  Â  Â  Â somewhat easy in a local dev environment, but the shell<br>
  Â  Â  Â  commands<br>
  Â  Â  Â  Â  Â  Â  Â  Â can be useful in contexts with no easy GUI-line :)<br>
<br>
<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â On Sun, Sep 20, 2015 at 3:30 PM, Sereysethy TOUCH<br>
  Â  Â  Â  Â  Â  Â  Â  Â <<a href="mailto:touch.sereysethy@gmail.com" target="_blank">touch.sereysethy@gmail.com</a><br></span><div><div class="h5">
  Â  Â  Â  <mailto:<a href="mailto:touch.sereysethy@gmail.com" target="_blank">touch.sereysethy@gmail.com</a>>> wrote:<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â Dear Andin,<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â To be honest, I am new to Erlang. So I am sorry<br>
  Â  Â  Â  sometimes<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â for my naive questions.<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â I just tried to fix and debug erlang code written<br>
  Â  Â  Â  by another<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â person. I am not sure yet where to look at. Since<br>
  Â  Â  Â  we dont<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â use anything special about SSL, beside we ask user<br>
  Â  Â  Â  browser<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â to present certificate and pass it on to our agent<br>
  Â  Â  Â  backend<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â to process it. I look at the code, it seems nothing<br>
  Â  Â  Â  is unusual.<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â You said this bug exists since Erlang 17? But why<br>
  Â  Â  Â  there were<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â no memory leak when it ran on Erlang 17.<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â I did as Jesper Louis Andersen suggested, and I saw<br>
  Â  Â  Â  there a<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â big amount of memory being used by ssl_manager.<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â 32794  Â  Â  Â  Â  Â client_ssl_otp_session_cache<br>
  Â  Â  Â  ordered_set 0<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â 89  Â  Â  Â ssl_manager<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â 36891  Â  Â  Â  Â  Â server_ssl_otp_session_cache<br>
  Â  Â  Â  ordered_set<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â 1564  Â 67995  Â  ssl_manager<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â 40993  Â  Â  Â  Â  Â httpc_manager__session_cookie_db<br>
  Â  Â  Â  bag  Â 0<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â 299  Â  Â  httpc_manager<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â And it keeps increasing overtime.<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â Can you let me know or pointing me to any documents<br>
  Â  Â  Â  on how<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â to use observer application?<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â Thanks, Sethy<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â On Sun, Sep 20, 2015 at 5:07 AM, Ingela Andin<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â <<a href="mailto:ingela.andin@gmail.com" target="_blank">ingela.andin@gmail.com</a><br></div></div><span class="">
  Â  Â  Â  <mailto:<a href="mailto:ingela.andin@gmail.com" target="_blank">ingela.andin@gmail.com</a>>> wrote:<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â Hi!<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â 2015-09-19 18:34 GMT+02:00 Sereysethy TOUCH<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â <<a href="mailto:touch.sereysethy@gmail.com" target="_blank">touch.sereysethy@gmail.com</a><br></span>
  Â  Â  Â  <mailto:<a href="mailto:touch.sereysethy@gmail.com" target="_blank">touch.sereysethy@gmail.com</a>>>:<div><div class="h5"><br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â Hello,<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â I just recently updated Erlang to latest<br>
  Â  Â  Â  version OTP<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â 18 on Ubuntu server. It uses cowboy<br>
  Â  Â  Â  (websocket),<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â ranch, ssl, erlydtl & rabbitmq. It used to<br>
  Â  Â  Â  work fine<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â in OTP 17. The program is correctly<br>
  Â  Â  Â  compiled but<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â during the execution the memory kept<br>
  Â  Â  Â  increasing. I<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â need to restart the process every one or<br>
  Â  Â  Â  two hours<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â to free some memory.<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â I have read a post here<br>
<br>
  Â  Â  Â  [<a href="http://erlang.2086793.n4.nabble.com/R18-Unbounded-SSL-Session-ETS-Table-Growth-td4713697.html" rel="noreferrer" target="_blank">http://erlang.2086793.n4.nabble.com/R18-Unbounded-SSL-Session-ETS-Table-Growth-td4713697.html</a>]<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â which discussed about the ssl_session_cache ETS<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â table which can become very large.<br>
<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â Well that bug is now fixed for 18.1 and in maint on<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â github. This bug however has been around for a<br>
  Â  Â  Â  while so<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â it is unlikly that this bug causes 18 to behave<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â different from 17.<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â The process beam.smp can go up to more than 5G<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â during a few hours of executions.<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â I am not yet sure what is the root cause of<br>
  Â  Â  Â  this issue.<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â Does anyone know how to fix this? Or where<br>
  Â  Â  Â  should I<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â look at?<br>
<br>
<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â You could try using the observer application to<br>
  Â  Â  Â  inspect<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â the node, makes inspecting easy.<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â Let us know your findings.<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â Regards Ingela Erlang/OTP team - Ericsson AB<br>
<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â Thanks, Sethy<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â _______________________________________________<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â erlang-questions mailing list<br></div></div>
  Â  Â  Â  <a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a> <mailto:<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a>><span class=""><br>
  Â  Â  Â  <a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br>
<br>
<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â _______________________________________________<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â erlang-questions mailing list<br></span>
  Â  Â  Â  <a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a> <mailto:<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a>><span class=""><br>
  Â  Â  Â  <a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br>
<br>
<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â --<br>
  Â  Â  Â  Â  Â  Â  Â  Â J.<br>
<br>
<br>
<br>
<br>
  Â  Â  Â  _______________________________________________<br>
  Â  Â  Â  erlang-questions mailing list<br></span>
  Â  Â  Â  <a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a> <mailto:<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a>><span class=""><br>
  Â  Â  Â  <a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br>
<br>
  Â  --<br>
  Â  Loïc Hoguin<br>
  Â  <a href="http://ninenines.eu" rel="noreferrer" target="_blank">http://ninenines.eu</a><br>
  Â  Author of The Erlanger Playbook,<br>
  Â  A book about software development using Erlang<br>
<br>
<br>
</span></blockquote><div class="HOEnZb"><div class="h5">
<br>
-- <br>
Loïc Hoguin<br>
<a href="http://ninenines.eu" rel="noreferrer" target="_blank">http://ninenines.eu</a><br>
Author of The Erlanger Playbook,<br>
A book about software development using Erlang<br>
</div></div></blockquote></div><br></div>