You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@community.apache.org by Yuvraj Raj <ra...@michaels.com> on 2013/05/22 23:57:25 UTC

log4net.dll version 1.2.10.0 (FileSystemWatcher objects)

Hi,

I am application developer team supporting.NET project in Michaels Stores. We have been using log4net.dll version 1.2.10.0 for application logs for our project. The application is implemented in .NET , C# with 3.5 framework.

Recently we have faced System.OutOfMemoryException exception thrown by the application. We have opened case with Microsoft.  Microsoft analyzed and said memory consumption is due to FileSystemWatcher objects used by log4net.Config.XmlConfigurator+ConfigureAndWatchHandler which are still alive and pinned objects.

>From the memory dump, They found >2000 instances of log4net.Config.XmlConfigurator+ConfigureAndWatchHandler and the FileSystemWatcher objects created that contributed this issue. The issue is happening due to the fragmentation of Gen2 Heap. The reason for the fragmentation is the pinned System.IO.Overlapped objects used by FileSystemWatcher objects.

To resolve the memory  issue, we need to get rid of the fragmentation caused by pinned objects used by FileSystemWatcher objects

We have created logger object in singleton class but not sure how multiple objects are being created.

When looking at the log4net.dll help from Apache web page, we found the below link for log4net that have bug (LOG4NET-158) in version 1.2.10.0 saying XmlConfigurator.ConfigureAndWatch() leaks resources if called multiple times

https://issues.apache.org/jira/browse/LOG4NET-158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601148#action_12601148

The issue was fixed in version 1.2.11.0. Please let us know if above memory issue was related to the bug and it has been resolved in the next release.

Any help would be greatly appreciated .


Best Regards,
Yuvraj
Work: 972 409 5703 | Support: 972 400 0174 | Cell: 469 438 1396



_____________________________________________________________________________
Scanned by IBM Email Security Management Services powered by MessageLabs. For more information please visit http://www-935.ibm.com/services/us/index.wss/offerfamily/iss/a1026954
_____________________________________________________________________________

Re: log4net.dll version 1.2.10.0 (FileSystemWatcher objects)

Posted by Stefan Bodewig <st...@freenet.de>.
Hi Yuvraj

On 2013-05-23, Yuvraj Raj wrote:

> I have also sent mails on the project email-list but receive as
> auto-email, not sure if this is a failure or they have received it.

Not, it has not been received so far.  You've sent your mail to

> To: <lo...@logging.apache.org>,
>     <lo...@logging.apache.org>

The correct address would be log4net-user@logging.apache.org - and
please subsribe to that list first by sending a mail to
log4net-user-subscribe@logging.apache.org

Cheers

        Stefan

RE: log4net.dll version 1.2.10.0 (FileSystemWatcher objects)

Posted by Yuvraj Raj <ra...@michaels.com>.
Hi,

Appreciate your reply on this.

I have also sent mails on the project email-list but receive as auto-email, not sure if this is a failure or they have received it. I have attached the response. Could you please me help on this.


Best Regards,
Yuvraj
Work: 972 409 5703 | Support: 972 400 0174 | Cell: 469 438 1396

-----Original Message-----
From: Bertrand Delacretaz [mailto:bdelacretaz@apache.org] 
Sent: Thursday, May 23, 2013 3:05 AM
To: dev@community.apache.org
Cc: Yuvraj Raj
Subject: Re: log4net.dll version 1.2.10.0 (FileSystemWatcher objects)

Hi,

On Wed, May 22, 2013 at 11:57 PM, Yuvraj Raj <ra...@michaels.com> wrote:
> ...We have been using log4net.dll version 1.2.10.0 for application logs for our project...

Technical questions about this should go to that project's list, see http://logging.apache.org/log4net/mail-lists.html

-Bertrand

_____________________________________________________________________________
Scanned by IBM Email Security Management Services powered by MessageLabs. For more information please visit http://www-935.ibm.com/services/us/index.wss/offerfamily/iss/a1026954
_____________________________________________________________________________

_____________________________________________________________________________
Scanned by IBM Email Security Management Services powered by MessageLabs. For more information please visit http://www-935.ibm.com/services/us/index.wss/offerfamily/iss/a1026954
_____________________________________________________________________________

Re: log4net.dll version 1.2.10.0 (FileSystemWatcher objects)

Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi,

On Wed, May 22, 2013 at 11:57 PM, Yuvraj Raj <ra...@michaels.com> wrote:
> ...We have been using log4net.dll version 1.2.10.0 for application logs for our project...

Technical questions about this should go to that project's list, see
http://logging.apache.org/log4net/mail-lists.html

-Bertrand