logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gülcü <c...@qos.ch>
Subject Re: WebLogic 8.1 and Chainsaw
Date Wed, 22 Sep 2004 09:49:48 GMT
At 11:01 AM 9/17/2004, Stephen Pain wrote:

>We were using chainsaw to monitor WL 8.1 too, using a SocketHubAppender 
>(so that multiple chainsaw clients could easily connect to receive the 
>logs) - it's especially useful for us because we don't have direct access 
>to the drive that hosts the log files (we have to access them via a web 
>portal). We found that if chainsaw was left connected to the server, 
>collecting log events over a long period of time but not being looked at 
>(eg over a lunch break) we could hang all the EJBs that used log4j.
>As I understand it, an AsyncAppender wouldn't actually prevent this kind 
>of issue - just delay it... when the AsyncAppender's buffer also fills up, 
>it'll hang in the same way (correct me if I'm wrong?)

You   are   absolutely    right.    AsyncAppender   uses   a   bounded
buffer. Consequently, if  the buffer becomes full, it  will not accept
any new events as long as the buffer remains full.

To give you an example, let  us assume that events are generated at an
average rate of  32 logging events per second. Let  us assume that the
user has has settled for the  default buffer size of 128, meaning that
the AsyncAppender buffer has room to store exactly 128 logging events.
If  for whatever  reason, the  appender encapsulated  by AssyncAppder,
e.g. SocketAppender, is unable to  output events at a rate faster than
the  rate  of  event   arrival,  events  will  accumulate  within  the
AsyncAppender buffer until  it eventually fills up. If  we assume that
events  are  serviced  at a  rate  of  16  events  per second  by  the
SocketAppender, then  AsyncAppender's buffer will become  full after 8
seconds  (on average). If  the SocketAppender  is blocked  because its
other end  no longer accepts events, then  AsyncAppender's buffer will
become full after only 4 seconds.

Systems where  arrival rate of  events is higher than  their servicing
rate are called *unstable*. Apart  from throwing away events, there is
nothing    one    can    do    to   render    an    unstable    system
stable. Indiscriminately throwing memory at the problem can only delay
the impending system blockage, but cannot prevent it on the long term.

Coming back to the problem at hand, we should investigate why chainsaw
blocks   after  a  while,   because  if   chainsaw  is   blocked,  all
AsyncAppender can do is to delay  disaster by only a few seconds or at
most few minutes.


Ceki Gülcü

      For log4j documentation consider "The complete log4j manual"
      ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp  

To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

View raw message