<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>