[erlang-questions] erlang woes
tech@REDACTED
tech@REDACTED
Thu Aug 5 09:12:15 CEST 2010
Arun,
I think there are a few things from the mail that one can tackle and use to
look at solving it, but first some more information may be useful in order to
address your concerns.
1. Are you using OTP principles and using a supervision structure for your
applaction?
2. It seems that it's an unmatched case entry that causes the crash
{{case_clause,
[{handler_info,#Ref<0.0.17.61372>,<0.17225.36>,
undefined,<0.15665.36>,initiating}]},
[{httpc_manager,handle_connect_and_send,5},
{httpc_manager,handle_info,2},
{gen_server,handle_msg,5},
{proc_lib,init_p_do_apply,3}]}
I have always found that in such a situation it's good to start looking from
the top to the bottom.
In this case it may seem that the problem case could be in httpc_manager
handle_connect_and _send and that function doesn't match the specific inputs
reflected in line one.
Hope this helps for a start
On Thursday, August 05, 2010 07:37:22 Arun Suresh wrote:
> Hello folks..
>
> Ive been using erlang for a while now.. and ive got a production system up
> and running from scratch.. but there are some really annoying aspects of
> the platform.. the most fundamental of which is the fact that when a node
> crashes it is very hard to figure out exactly why.. Almost ALL the time
> what i see in the crash dump is something akin to :
>
> =erl_crash_dump:0.1
> Wed Aug 4 21:50:01 2010
> Slogan: eheap_alloc: Cannot allocate 1140328500 bytes of memory (of type
> "heap").
> System version: Erlang R13B04 (erts-5.7.5) [source] [smp:2:2] [rq:2]
> [async-threads:0] [hipe] [kernel-poll:false]
> Compiled: Tue May 11 12:37:38 2010
> Taints:
>
>
> at which point I start to comb the sasl logs... and 9 out of 10 times... it
> is because some critical process has died and the supervisor is busy
> restarting it.. for example, the other day.. my node crashed and from the
> sasl logs.. i see that the http manager for a profile I had created had
> crashed like so :
>
> =CRASH REPORT==== 4-Aug-2010::21:47:09 ===
> crasher:
> initial call: httpc_manager:init/1
> pid: <0.185.0>
> registered_name: httpc_manager_store
> exception exit: {{case_clause,
> [{handler_info,#Ref<0.0.17.61372>,<0.17225.36>,
> undefined,<0.15665.36>,initiating}]},
> [{httpc_manager,handle_connect_and_send,5},
> {httpc_manager,handle_info,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> in function gen_server:terminate/6
> ancestors: [httpc_profile_sup,httpc_sup,inets_sup,<0.46.0>]
> messages: [{'EXIT',<0.16755.36>,normal},
> {connect_and_send,<0.16752.36>,#Ref<0.0.17.61366>,
>
>
> and subsequent messages were related to the supervisor trying to restart
> the profile manager... and failing..
>
> Now my point is... why did the node have to crash.. just because the
> manager has to be restarted ?
> and why does the crash.dump always keep telling me im out of memory..
>
> The problem is.. I thought erlang was built to be fault tolerant.. the
> choice of me using erlang had a LOT to do with doing away with the having
> to code defensively.. "let it crash" and all that .. just make sure u have
> a supervisor that restarts ur process and everything will just work
> fine... but my experience is that most of the time.. simple process
> restarts bring the whole node crashing down...
>
> Would deeply appreciate it someone could tell me if there is something
> fundamentally wrong with the way im doing things.. or if anyones been in my
> situation and have had some enlightenments.
>
> thanks in advance
> -Arun
More information about the erlang-questions
mailing list