[erlang-questions] stress test with tcp_server
Adam Lindberg
adam@REDACTED
Mon Jun 25 12:36:28 CEST 2007
On 6/24/07, 周敏 <erlanging@REDACTED> wrote:
> test(Port) ->
> case gen_tcp:connect("192.168.0.217", Port, [binary,{packet, 0}]) of
> {ok, _} ->
> test(Port);
> _ ->
> test(Port)
> end.
>
> after compile these codes. It appears that only 1016 connections can be
> accepted by the server. What's matter with this? I really know what going
> wrong .. thx at first.
>
> Cheers,
> Jeremy
I would try to close the sockets in between, or reuse them (for example by
creating a socket pool). Because, in your loop, you create a lot of sockets
but never close them.
Cheers!
Adam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20070625/4599a3ee/attachment.htm>
More information about the erlang-questions
mailing list