Open orchardbot opened 10 years ago
@sebastienros commented:
We can't prevent the warning from being written. What should be changed is that the default log level for Azure should be ERROR and not WARN.
to be fixed in src\Orchard.Azure\Orchard.Azure.Web\Config\log4net.Release.config
gregslater created: https://orchard.codeplex.com/workitem/20304
I'm seeing repeated warnings from NHibernate on an Azure cloud service (I assume they're warnings, the level isn't included in the log message):
NHibernate.Cache.ReadWriteCache - An item was expired by the cache while it was locked (increase your cache timeout): Orchard.Core.Settings.Descriptor.Records.ShellDescriptorRecord#1 ; TraceSource 'w3wp.exe' event
NHibernate.Cache.NoCacheProvider - Second-level cache is enabled in a class, but no cache provider was selected. Fake cache used. ; TraceSource 'w3wp.exe' event
These warnings are logged constantly - about 100 times per second! The first one is repeated for various records.
I'm running 2 ExtraSmall instances. I did not have this problem until upgrading from 1.5.1 to 1.7.2
SysCache is disabled as recommended here. Is it safe to ignore these warnings? If so, can they be "silenced" without changing the log level to ERROR?
UPDATE
It seems that the second message about "fake cache" is logged as a warning by the NHibernate NoCacheProvider every time its BuildCache method is called to configure the cache. I assume this is an issue with NHibernate, because I can't think why it would log a warning every time the cache provider is created, surely just once would do! However, should we implement an NHibernate cache provider in Orchard? Even though using the SysCache module when more than one Azure instance is not recommended?
A workaround (though not ideal) is to change the log level for the Azure project to ERROR instead of WARN.