logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc Carrion" <mcarr...@opfactory.com>
Subject problems using SocketAppender and AsyncAppender
Date Tue, 15 Jan 2002 10:23:57 GMT
  Hello, we are using log4j in our application (configuring some
socket appenders) and recently we had problems when one of the
clients(chainsaw, logfactor5, ...) listening for logs hangs, the
application blocks waiting for I/O. 

  We found that the problem occurs because the client is blocked for
I/O and then the socket blocks too, and due to, the main thread too.

  Finally we decided to use the AsyncAppender, it should work
asynchronous, it would use another thread to write so the main thread
will never become blocked. But, if one of the SocketAppenders
referenced in the AsyncAppender hangs, then it never write and the
queue of events become full, so, the AsyncAppender blocks, and
consecuently the main thread blocks waiting for I/O.

  So, the AsyncAppender doesn't works asynchronous, it waits actively
until the queue has more space.

  Do anybody had the same problem? How did you solve it? Is it a
known bug? Will it be solved?

  Thanks,
         Fernando & Marc


--
To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>


Mime
View raw message