[erlang-questions] Too many processes
marmll
mm@REDACTED
Fri Apr 17 15:00:20 CEST 2009
Hi,
i have the following problem:
My error_logger tells me that I’am having “Too many processes” and the
erlang engine crashed.
When I’am starting the gen_server I’am checking the
erlang:system_info(process_count) and they tells me 80 processes.
Codesnip from init:
F = fun(Sock) -> parse_packet(Sock, Client) end,
tcp_server:stop(Port),
{ok, _} = tcp_server:start_raw_server(Port, F, 10240,2048),
And here my parse_packet:
parse_packet(Socket, Client) ->
receive
{tcp, Socket, Bin} ->
io:format("--> ~w~n", [Bin]);
{tcp_closed, Socket} ->
error_logger:error_report([{module, ?MODULE},{line,
?LINE},{message, "tcpclosed"},{call, "tcp_closed aus
receive"},{now,now()}]);
{packet, Packet} ->
io:format("<-- ~w~n", [Packet]),
parse_packet(Socket, Client)
end.
With every connect to the server my process_count is increasing 1 !
How can I handle the process_count ? I think the the tail recursion at
parse_packet is not good.
Please help me
Thanks
--
View this message in context: http://www.nabble.com/Too-many-processes-tp23097100p23097100.html
Sent from the Erlang Questions mailing list archive at Nabble.com.
More information about the erlang-questions
mailing list