MSMQ Distributor hangs and stops writting logs

Topics: Logging Application Block
Mar 14, 2011 at 7:34 PM

Hi: we're using logging building block of Enterprise Library 4.1

We have configured a number of boxes to log to a remote queue on our log server. Thils log server runs Distributor and writes to local disks according to our configuration based on flat file listeners. we have done several tests with not problem. However, after we moved to Production, we found that the distributor stopped writing logs twice. Weird thing is that the Distributor service doesn't shut down; we can see it as started in service control manager, it just simply stops reading messages from queue, and doesn't report any error to eventlog, so we don't have any clue to troubleshoot the issue. And if we re-start the service, the pending log lines in MSMQ are processed correctly. That last clue makes me think that it is something at the moment of writing to the file...

Regards,

Santiago.

 

Mar 15, 2011 at 2:03 AM

Were the messages in the queue removed but they don't get to the destination log sinks?  Does this happen consistently or intermittently?  In addition, make sure that you can really log using the trace listener referenced in the Logging Errors and Warnings special category. If it's an event log trace listener, verify that you can indeed log in the event viewer.

 

Sarah Urmeneta
Global Technologies and Solutions
Avanade, Inc.
entlib.support@avanade.com

Mar 15, 2011 at 11:51 PM

The service takes logs from the queue and writes them to file just fine for a while, until it stops working.

Intermittently the service would just stop working even though the process is still running. It doesn't write to the filesystem, leaving the messages untouched in the queue.

Once we restart the service it resumes writing logs as expected.

How could we configure the service to write it's own logs for debugging ?? Would it write its own logs even when it is not writing the rest ??

 

Thanks

Mar 16, 2011 at 1:26 AM

I don't quite get your last 2 questions.  I think there's actually an exception which should get logged indicating the cause of the behavior you're getting.  Are you using a Formatted Event Log Trace Listener under the Logging Errors and Warnings special category?  If yes, my recommendation would be to to create separate file trace listener and reference that in the said category instead of the Formatted Event Log Trace Listener.  I'm suggesting this as I'm thinking you might be having problem logging to the event viewer.

 

Sarah Urmeneta
Global Technologies and Solutions
Avanade, Inc.
entlib.support@avanade.com