[erlang-questions] SSL connection is closed unexpectedly
Alex Shneyderman
a.shneyderman@REDACTED
Tue Jan 15 15:39:00 CET 2013
Hello, everybody!
I had a need to STARTTLS-enable tsung's jabber client. I use ssl
engine that comes with R15B02. Basically, code takes an existing
socket (tsung client - FSM owns that socket) and does an upgrade to
TLS at an appropriate moment in time. Like so:
{ok,SslSocket} = ssl:connect(Socket, [{verify,
verify_none},{reuse_sessions,false}]),
ssl:controlling_process(SslSocket,ClientFSMPid),
ssl:setopts(SslSocket,[{active, once}]),
If I spawn some number of clients (the number varies but anything
beyond 200 seems to cause the problem) - connections get dropped and I
believe it is the client side that drops the connections (since this
behavior is not observed without TLS in the picture). So the
questions:
1. Is this a known default behavior? If so how do I make it go away,
i.e. some of the tests we are running need 2000 clients and plain
(non-tls).
2. Is there a simple way to debug these disconnects. In the logs all I
am getting is {tcp_closed, #Port<0.1608>}. Message does not have hints
as to why this socket was closed. Anything I can do to figure out
exactly why this happens?
Cheers,
Alex.
More information about the erlang-questions
mailing list