You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-dev@logging.apache.org by "Vibha Kapur (JIRA)" <ji...@apache.org> on 2009/01/12 18:40:00 UTC

[jira] Created: (LOG4NET-192) Memory leaks with large multi-threaded application in log4net DLL 1.2.0.30714

Memory leaks with large multi-threaded application in log4net DLL 1.2.0.30714
-----------------------------------------------------------------------------

                 Key: LOG4NET-192
                 URL: https://issues.apache.org/jira/browse/LOG4NET-192
             Project: Log4net
          Issue Type: Bug
         Environment: Windows 2003, .NET framework 1.1
            Reporter: Vibha Kapur
            Priority: Critical


We've coded log4net (1.2.0-beta8) into our application. With log4net enabled we see our virtual memory increasing and never decreasing, over a period of time and particularly with stress testing the server runs out of memory and everything grinds to a halt.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (LOG4NET-192) Memory leaks with large multi-threaded application in log4net DLL 1.2.0.30714

Posted by "Vibha Kapur (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LOG4NET-192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12663656#action_12663656 ] 

Vibha Kapur commented on LOG4NET-192:
-------------------------------------

Today we tried with new Log4Net also. It's again crashing when i set my log level to Debug.
With Old Log4Net my applicaton is not crashing with log level Info.
Please advice.

> Memory leaks with large multi-threaded application in log4net DLL 1.2.0.30714
> -----------------------------------------------------------------------------
>
>                 Key: LOG4NET-192
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-192
>             Project: Log4net
>          Issue Type: Bug
>         Environment: Windows 2003, .NET framework 1.1
>            Reporter: Vibha Kapur
>            Priority: Critical
>
> We've coded log4net (1.2.0-beta8) into our application. With log4net enabled we see our virtual memory increasing and never decreasing, over a period of time and particularly with stress testing the server runs out of memory and everything grinds to a halt.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (LOG4NET-192) Memory leaks with large multi-threaded application in log4net DLL 1.2.0.30714

Posted by "Vibha Kapur (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LOG4NET-192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12663266#action_12663266 ] 

Vibha Kapur commented on LOG4NET-192:
-------------------------------------

We have not tried latest version of log4net yet. 
But is it a bug in existing log4net DLL 1.2.0.30714 and upgrading to new log4net version 1.2.10 is the only solution?
Also what would be the recommended logging level configuration (Error, fatal or info)?



> Memory leaks with large multi-threaded application in log4net DLL 1.2.0.30714
> -----------------------------------------------------------------------------
>
>                 Key: LOG4NET-192
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-192
>             Project: Log4net
>          Issue Type: Bug
>         Environment: Windows 2003, .NET framework 1.1
>            Reporter: Vibha Kapur
>            Priority: Critical
>
> We've coded log4net (1.2.0-beta8) into our application. With log4net enabled we see our virtual memory increasing and never decreasing, over a period of time and particularly with stress testing the server runs out of memory and everything grinds to a halt.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (LOG4NET-192) Memory leaks with large multi-threaded application in log4net DLL 1.2.0.30714

Posted by "Ron Grabowski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LOG4NET-192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12664327#action_12664327 ] 

Ron Grabowski commented on LOG4NET-192:
---------------------------------------

By more information I meant things like posting your log4net.config file, not your configuration file to your application. What appenders are you using? FileAppender, MemoryAppender, etc.?

 <log4net>
   <appender name="FileAppender" type="log4net.Appender.FileAppender">
   </appender>    
   <logger name="NHibernate" additivity="false">
     <level value="WARN" />
     <appender-ref ref="FileAppender" />
   </logger>
 </log4net>

How are you configuring log4net?

 XmlConfigurator.ConfigureAndWatch(
  new FileInfo(AppDomain.CurrentDomain.SetupInformation.ApplicationBase + "log4net.config"));

Are you sure you're calling that configuring code just one time and not over and over?

What kind of multi-threading are you using? Are you creating 1,000 background threads to do some of long running processing? What are all these threads doing? Are you trying to create a single massive log message and log that?

Do you have a normal .NET stack trace showing where the out of memory exception came from? i.e. what method in log4net caused that exception?

Is this your first time using log4net? Did you recently add log4net to your application?

> Memory leaks with large multi-threaded application in log4net DLL 1.2.0.30714
> -----------------------------------------------------------------------------
>
>                 Key: LOG4NET-192
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-192
>             Project: Log4net
>          Issue Type: Bug
>         Environment: Windows 2003, .NET framework 1.1
>            Reporter: Vibha Kapur
>            Priority: Critical
>
> We've coded log4net (1.2.0-beta8) into our application. With log4net enabled we see our virtual memory increasing and never decreasing, over a period of time and particularly with stress testing the server runs out of memory and everything grinds to a halt.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (LOG4NET-192) Memory leaks with large multi-threaded application in log4net DLL 1.2.0.30714

Posted by "Ron Grabowski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LOG4NET-192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ron Grabowski resolved LOG4NET-192.
-----------------------------------

    Resolution: Cannot Reproduce

There hasn't been any additional posts on this item for several months after I asked for more information.

> Memory leaks with large multi-threaded application in log4net DLL 1.2.0.30714
> -----------------------------------------------------------------------------
>
>                 Key: LOG4NET-192
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-192
>             Project: Log4net
>          Issue Type: Bug
>         Environment: Windows 2003, .NET framework 1.1
>            Reporter: Vibha Kapur
>            Priority: Critical
>
> We've coded log4net (1.2.0-beta8) into our application. With log4net enabled we see our virtual memory increasing and never decreasing, over a period of time and particularly with stress testing the server runs out of memory and everything grinds to a halt.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (LOG4NET-192) Memory leaks with large multi-threaded application in log4net DLL 1.2.0.30714

Posted by "Ron Grabowski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LOG4NET-192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12663910#action_12663910 ] 

Ron Grabowski commented on LOG4NET-192:
---------------------------------------

What is the exception? If you want help you need to show a stack trace, explain your configuration (post your log4net.config file), show how you're initializing log4net, how its being used, etc.

> Memory leaks with large multi-threaded application in log4net DLL 1.2.0.30714
> -----------------------------------------------------------------------------
>
>                 Key: LOG4NET-192
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-192
>             Project: Log4net
>          Issue Type: Bug
>         Environment: Windows 2003, .NET framework 1.1
>            Reporter: Vibha Kapur
>            Priority: Critical
>
> We've coded log4net (1.2.0-beta8) into our application. With log4net enabled we see our virtual memory increasing and never decreasing, over a period of time and particularly with stress testing the server runs out of memory and everything grinds to a halt.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (LOG4NET-192) Memory leaks with large multi-threaded application in log4net DLL 1.2.0.30714

Posted by "Vibha Kapur (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LOG4NET-192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12664137#action_12664137 ] 

Vibha Kapur commented on LOG4NET-192:
-------------------------------------

We get following exception in our application log file:
Caught Exception: [Exception of type System.OutOfMemoryException was thrown.] for Type [System.String]
Exception: System.OutOfMemoryException
Message: Exception of type System.OutOfMemoryException was thrown.



We have given following log4net configuration in our application config file:
<LogAndTrace>
		<Log4Net>
			<LoggerDefinition FileName="StrideSmartRouterAppLogs.config" FilePath="C:\Program Files\Elind\Stride\FIXGateway\SRBinaries" Severity="Debug" />
		</Log4Net>
	</LogAndTrace>



We used to windbg tool to analyse the issue. We could see lot of log4net objects into wait state via SYNCBLKALL command. Here are top 15 rows:
Index SyncBlock MonitorHeld Recursion   Thread  ThreadID     Object Waiting
    1 0x00000000                                             0x01093178
    2 0x001967e4            0         0        0     none    0x01099c14 System.ServiceProcess.NativeMethods/ServiceMainCallback
    3 0x00196810            0         0        0     none    0x01099c4c System.ServiceProcess.NativeMethods/ServiceControlCallbackEx
    4 0x07eaf5b4            0         0        0     none    0x011383f8 log4net.Repository.Hierarchy.DefaultLoggerFactory/LoggerImpl
    5 0x00000000                                             0x0112f4dc
    6 0x00000000                                             0x01130a48
    7 0x001968c0            0         0        0     none    0x01132fa4 log4net.Repository.Hierarchy.DefaultLoggerFactory/LoggerImpl
    8 0x00196894            0         0        0     none    0x0113518c log4net.Repository.Hierarchy.DefaultLoggerFactory/LoggerImpl
    9 0x07d71bb8            0         0        0     none    0x01138460 log4net.Repository.Hierarchy.DefaultLoggerFactory/LoggerImpl
   10 0x03df9770            0         0        0     none    0x011384c4 log4net.Repository.Hierarchy.DefaultLoggerFactory/LoggerImpl
   11 0x00000000                                             0x01365614
   12 0x00000000                                             0x01a160f8
   13 0x07de5d30            0         0        0     none       22501 Free
   14 0x1069bdbc            0         0        0     none         492 Free
   15 0x00000000                                             0x015096a4



I analysed stack trace also at some basic level but did not get much info out of that.
I am mailing my applicatin's Dumpstack at the yahoo ID mentioned in your profile.

> Memory leaks with large multi-threaded application in log4net DLL 1.2.0.30714
> -----------------------------------------------------------------------------
>
>                 Key: LOG4NET-192
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-192
>             Project: Log4net
>          Issue Type: Bug
>         Environment: Windows 2003, .NET framework 1.1
>            Reporter: Vibha Kapur
>            Priority: Critical
>
> We've coded log4net (1.2.0-beta8) into our application. With log4net enabled we see our virtual memory increasing and never decreasing, over a period of time and particularly with stress testing the server runs out of memory and everything grinds to a halt.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (LOG4NET-192) Memory leaks with large multi-threaded application in log4net DLL 1.2.0.30714

Posted by "Ron Grabowski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LOG4NET-192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12663126#action_12663126 ] 

Ron Grabowski commented on LOG4NET-192:
---------------------------------------

You going to have to give us a little more information. Have you considered upgrading to the latest version of log4net? I know that log4net doesn't release often by 1.2.0-beta8 was released in 2003. That would make it about 6 years old.

> Memory leaks with large multi-threaded application in log4net DLL 1.2.0.30714
> -----------------------------------------------------------------------------
>
>                 Key: LOG4NET-192
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-192
>             Project: Log4net
>          Issue Type: Bug
>         Environment: Windows 2003, .NET framework 1.1
>            Reporter: Vibha Kapur
>            Priority: Critical
>
> We've coded log4net (1.2.0-beta8) into our application. With log4net enabled we see our virtual memory increasing and never decreasing, over a period of time and particularly with stress testing the server runs out of memory and everything grinds to a halt.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.