ASP .Net multiple Application Pools, and log file locking

Martin Robinson martin.robinson at dai.co.uk
Wed Aug 5 09:00:14 EDT 2015


I've had a look at the log4cpp source code, and it seems that there is no way to stop this holding an open handle on the file, without rewriting it.

So - only possible solution is basically to just disable the Native logging (for DEBUG and INFO certainly, and maybe WARN as well) and just let the file grow slowly. If we need to see live DEBUG output from this on a production server, we'd need to set up a SysLog Appender instead of the File Appended, routed to a separate Syslog server.

Perhaps someone on the Shibboleth team could come up with a better logging mechanism? After all, on IIS, the isapi filter is of necessity multi-instance, and the log4shib configuration as shipped simply does not work in that situation. This only effects the Native logs of course - those from the shibd daemon service are fine because there is only once instance of that.

Martin Robinson



-----Original Message-----
From: dev [mailto:dev-bounces at shibboleth.net] On Behalf Of Paul Caskey
Sent: 05 August 2015 13:23
To: Shib Dev
Subject: RE: ASP .Net multiple Application Pools, and log file locking

You could always just turn off logging for native.log.  It has very little useful information in it.



> -----Original Message-----
> From: dev [mailto:dev-bounces at shibboleth.net] On Behalf Of Martin 
> Robinson
> Sent: Wednesday, August 05, 2015 5:02 AM
> To: Shib Dev
> Subject: ASP .Net multiple Application Pools, and log file locking
> 
> I have Shibboleth SP running under IIS 6.
> 
> My Default Web Site contains a number of ASP .Net applications running 
> under several Application Pools.
> 
> This results in multiple copies of the Shibboleth ISAPI Filter being 
> loaded - one per w3wp process. This seems to result in the native.log 
> file growing indefinitely, and the automatic rollover of log files (as 
> configured in native.logger etc) does not happen.  This is because 
> there are multiple open handles to these files, and no process can 
> rename/delete these files due to the open handles from the other processes.
> 
> I believe that log4j has a 'MinimalLock' locking mode that might get round this?
> How do I configure this in native.logger, or is there a better solution?
> 
> Thanks,
> 
> Martin Robinson
> 
> 
> --
> To unsubscribe from this list send an email to 
> dev-unsubscribe at shibboleth.net
--
To unsubscribe from this list send an email to dev-unsubscribe at shibboleth.net


More information about the dev mailing list