[erlang-bugs] SSL choking on concurrent clients?

Tobias Lindahl tobias.lindahl@REDACTED
Tue May 13 14:46:12 CEST 2014


2014-05-12 17:02 GMT+02:00 Ingela Anderton Andin <
Ingela.Anderton.Andin@REDACTED>:

> Hi!
>
> I changed your server loop to:
>
> server_loop(ListenSocket, N) ->
>     {ok, Socket} = ssl:transport_accept(ListenSocket),
>     spawn(fun() ->
>                   ok = ssl:ssl_accept(Socket),
>                   ssl:send(Socket, <<N>>),
>                   ssl:close(Socket)
>           end),
>     error_logger:info_msg("~w accepted\n", [N]),
>     server_loop(ListenSocket, N + 1).
>
> This will improve the situation. But increasing the number of concurrent
> clients can still cause a connectivity problem. When the
> server gets resource problems and sockets will be terminated already on
> tcp level. However so far I have not been able to find a bug only a load
> regulation problem.


Typically what happens is that some clients will not get a connection on
the

ssl:connect("localhost", 9999,  [], infinity)

but instead an {error, closed}. And it with that a pretty long delay for
the remaining connections.




>
>
> Regards Ingela Erlang/OTP team - Ericsson AB
>
>
> On 05/09/2014 03:23 PM, Richard Carlsson wrote:
>
>> Friday afternoon SSL fun: we're seeing long pauses where no client is
>> getting any replies. See attached module. At first we thought it was a
>> problem with lhttpc, but it turned out we could repeat the symptoms by
>> making some simple concurrent ssl connections. (In our original case,
>> the server was on another machine, and probably not using Erlang.)
>>
>>     /Richard
>>
>>
>> _______________________________________________
>> erlang-bugs mailing list
>> erlang-bugs@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-bugs
>>
>>
> _______________________________________________
> erlang-bugs mailing list
> erlang-bugs@REDACTED
> http://erlang.org/mailman/listinfo/erlang-bugs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140513/1f2c6ca1/attachment.htm>


More information about the erlang-bugs mailing list