0
votes

I created a windows service using C# and i was monitoring the application thread and handle use through performance monitor (This service looks at defined paths in app.config and clears defined file type that is older than X hours, the service is now handling 1000 files per minute)

Performance Monitor Service Handles Chart To keep an eye on the handles. I had my service my running without the log4net and the Handles AVG was around 240, it was +-10 which is stable as far as i know. when i enabled the log4net and started logging events for the application the numbers went up over 100% especially if the logger has less data to log (When i say less data i mean logs to a minimum if no files found to process)

I have no idea how to keep these Handles to a minimum and what is considered safe ?

I Enabled Debugging on log4net following this How to track down log4net problems

Only thing i found in this log that is related to an error is this :

log4net:ERROR XmlHierarchyConfigurator: No appender named [ConsoleAppender] could be found. log4net:ERROR Appender named [ConsoleAppender] not found.

App Config Screenshot

1
What is your logging configuration? - Peter
I added App Config Screenshot, click the link to the picture - Yazzan
First remove the reference to the console appender and test again - Peter
Peter, Thank you i will remove the console appender and test again - Yazzan
Peter, thank you for your response, it seems very stable now and the range is between 240 and 290, can you just let me know how the appender was affecting the Handles ? - Yazzan

1 Answers

0
votes

It seems you have to remove the console appender from you configuration. Or add configuration for that appender. You should not see that error in de log4net debug log.