[erlang-questions] erlang woes

Anthony Molinaro anthonym@REDACTED
Mon Aug 9 19:50:45 CEST 2010


Even the patched inets caused me problems with memory, see here

http://erlang.2086793.n4.nabble.com/Possible-leak-in-inets-httpc-td2282076.html#a2282805

I ended up switching to ibrowse, it was very painless and had much better
memory usage patterns.

-Anthony

On Thu, Aug 05, 2010 at 10:09:14AM -0700, Arun Suresh wrote:
> Thank you for the suggestion Joseph..
> 
> But i was aware of this bug.. it was fixed in inets-5.3.2.. my prod system
> is currently running with the patched inets... so i dont think that is cause
> of the crash..
> 
> -Arun
> 
> On Thu, Aug 5, 2010 at 7:21 AM, Joseph Wayne Norton <norton@REDACTED>wrote:
> 
> >
> > Please check this patch for R13B04 - I believe it will fix your memory
> > leak.
> >
> >
> > http://hibari.git.sourceforge.net/git/gitweb.cgi?p=hibari/patches;a=blob;f=otp_src_R13B04-httpc-memoryleak.patch;h=14eb7a603dc7f0f49f6685260dd0d0bebddc2f4c;hb=HEAD
> >
> > This patch was posted previously to one of the erlang.org mailing lists.
> >
> > I don't know your application's requirements but I would recommend most of
> > these patches for a vanilla R13B04 erlang system:
> >
> > http://hibari.git.sourceforge.net/git/gitweb.cgi?p=hibari/patches;a=tree
> >
> > Instructions for applying these patches can found here:
> >
> >
> > http://hibari.sourceforge.net/webpage-README-ERL.html#_erlang_otp_to_download
> >
> > regards,
> >
> >
> >
> > On Thu, 05 Aug 2010 22:55:27 +0900, Evans, Matthew <mevans@REDACTED>
> > wrote:
> >
> >  Are you using pg2 in a distributed system? There is a known (should be
> >> fixed) bug where pg2 was eating memory like crazy.
> >>
> >> -----Original Message-----
> >> From: erlang-questions@REDACTED [mailto:erlang-questions@REDACTED] On
> >> Behalf Of Arun Suresh
> >> Sent: Thursday, August 05, 2010 1:37 AM
> >> To: erlang-questions@REDACTED
> >> Subject: [erlang-questions] erlang woes
> >>
> >> 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
> >>
> >> ________________________________________________________________
> >> erlang-questions (at) erlang.org mailing list.
> >> See http://www.erlang.org/faq.html
> >> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
> >>
> >>
> >
> > --
> > norton@REDACTED
> >

-- 
------------------------------------------------------------------------
Anthony Molinaro                           <anthonym@REDACTED>


More information about the erlang-questions mailing list