I have an asp.net web application that uses log4net. I recently upgraded to from 1.2.0 to 1.2.9 because I needed to use FileAppender+MinimalLock in order to access the log files while the application was running. I also made some other changes to the application and started to get some strange behavior. The application would suddenly end for no apparent reason and at intermitted intervals. I added more logging to try to find out why this was happening and changed the log level from INFO to DEBUG. After trying many things, I changed the log level to ERROR and no more application errors. After some more testing I found that with the log level set to INFO or DEBUG the application would end suddenly, but raising the log level to WARN or ERROR stopped this behavior. The web application uses NHibernate O/R mapping, Forms Authentication and stores some objects in the session.
Has anyone else had similar problems or a possible explanation? Is it possibly related to the amount of resources (memory) that log4net is using? One more thing - on my computer and on our demo server I could not replicate these errors. The application only behaves this way on the production (third party) server. Here is the logging part of my web config: <appender name="FileLog" type="log4net.Appender.RollingFileAppender,log4net"> <lockingModel type="log4net.Appender.FileAppender+MinimalLock" /> <param name="File" value="log/bems_activity_log.txt" /> <param name="AppendToFile" value="true" /> <param name="RollingStyle" value="Size" /> <maxSizeRollBackups value="5" /> <maximumFileSize value="100KB" /> <param name="StaticLogFileName" value="true" /> <layout type="log4net.Layout.PatternLayout"> <param name="ConversionPattern" value="%d %-5p %c - %m%n" /> </layout> </appender> <root> <level value="DEBUG" /> <appender-ref ref="FileLog" /> </root> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="log4net" publicKeyToken="b32731d11ce58905" culture="neutral" /> <bindingRedirect oldVersion="1.2.0.30714" newVersion="1.2.9.0"/> </dependentAssembly> </assemblyBinding> </runtime>