[erlang-questions] Ranch + SSL = crash during init:stop/0
silver.buddy@REDACTED
silver.buddy@REDACTED
Sun Jan 25 20:24:24 CET 2015
Hello,
Look at this https://github.com/ninenines/ranch/issues/90
On 25/01/15 20:28, e@REDACTED wrote:
> Hello.
> I have a well localized problem with Ranch that raises several basic
> questions about OTP, which i need to understand in order to solve the
> problem.
>
> i have got the following applications running on a single isolated node:
>
> 1> application:which_applications().
>
> [{online37,"My Application","0.1.0"},
> {cowboy,"Small, fast, modular HTTP server.","1.0.0"},
> {ssl,"Erlang/OTP SSL application","5.3.6"},
> {public_key,"Public key infrastructure","0.22.1"},
> {cowlib,"Support library for manipulating Web protocols.",
> "1.0.0"},
> {mnesia,"MNESIA CXC 138 12","4.12.3"},
> {crypto,"CRYPTO","3.4.1"},
> {asn1,"The Erlang ASN1 compiler version 3.0.2","3.0.2"},
> {ranch,"Socket acceptor pool for TCP protocols.","1.0.0"},
> {stdlib,"ERTS CXC 138 10","2.2"},
> {kernel,"ERTS CXC 138 10","3.0.3"}]
>
>
> Q1: does this list represent the starting order of these applications
> listed?
>
> Q2: may i deduce from this list that 'ssl' will be stopped before
> 'ranch'? (should be called init:stop/0)
>
>
> the main problem is that during init:stop/0
> 'ranch' *DELIBERATELY* crashes with the reason: "socket closed"
> (in src/ranch_acceptor.erl:28)
> (which in my opinion most probably is caused by preliminary shut down of
> 'ssl')
>
>
> Q3: am i right in respect of 'ranch' that 'ssl' shall not be stopped
> before 'ranch'?
>
>
> my .app.src file (which corresponds to the applications listing above) is:
>
> {application, online37, [
> {description, "My Application"},
> {vsn, "0.1.0"},
> {modules, []},
> {registered, []},
> {applications, [
> kernel,
> stdlib,
> ssl,
> mnesia,
> cowboy
> ]},
> {mod, {online37_app, []}},
> {env, []}
> ]}.
>
>
> Q4: how could i affect the starting order of the applications? (provided
> i am using erlang.mk + relx)
More information about the erlang-questions
mailing list