Can you please share some information about how the cache works for DNN? How is page cache different from module cache and how does it work even a page has different modules that are viewable by different roles or if different roles have different permissions for the same module within a page. We are running into a weird issue. We are in the process of stress testing our DNN portal. We tried by turning off all caching in the portal. It looks like whenever any page is accessed, a file of size 0KB is created in the folder Portals/_default/Cache under the DNN installation. The file name is really long and contains .resources at the end. When Clear Cache link is accessed within DNN module, these files are not deleted. When disk caching is enabled we can see some other non zero bytes files under Portals/2/Cache folder. I am assuming these are the actual cached files.
Under heavy load we start seeing the following error in Event Viewer logs within DNN.
AssemblyVersion: 04.05.03
PortalID: 2
PortalName: Executive Portal
UserID: 502
UserName: test0220
ActiveTabID: 164
ActiveTabName: Documents
RawURL: /DotNetNuke_2/executive/Documents/tabid/164/DMXModule/662/Default.aspx?EntryId=1408
AbsoluteURL: /DotNetNuke_2/Default.aspx
AbsoluteURLReferrer: http://...../Documents/tabid/164/Default.aspx
UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: af9b9da8-c4b0-4686-aac5-8519616045c0
InnerException: Access to the path '....\DotNetNuke_2\website\Portals\_default\Cache\UG9ydGFsMg==.resources' is denied.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: System.IO.__Error.WinIOError
StackTrace:
Message: System.UnauthorizedAccessException: Access to the path '......\DotNetNuke_2\website\Portals\_default\Cache\UG9ydGFsMg==.resources' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.StreamWriter.CreateFile(String path, Boolean append) at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize) at System.IO.StreamWriter..ctor(String path, Boolean append) at System.IO.File.CreateText(String path) at DotNetNuke.Services.Cache.FileBasedCachingProvider.FBCachingProvider.CreateCacheFile(String FileName) at DotNetNuke.Services.Cache.FileBasedCachingProvider.FBCachingProvider.Insert(String CacheKey, Object objObject, CacheDependency objDependency, DateTime AbsoluteExpiration, TimeSpan SlidingExpiration, Boolean PersistAppRestart) at DotNetNuke.Common.Utilities.DataCache.SetCache(String CacheKey, Object objObject, TimeSpan SlidingExpiration, Boolean PersistAppRestart) at DotNetNuke.Entities.Portals.PortalController.GetPortal(Int32 PortalId) at Bring2mind.DNN.Modules.DMX.Security.Security..ctor(UserInfo& OurUser, Int32 PortalId) at Bring2mind.DNN.Modules.DMX.Controls.PortalModuleBase.get_DMXSecurity() at Bring2mind.DNN.Modules.DMX.Common.Query..ctor(PortalModuleBase& OurModule, HttpRequest& Request) at Bring2mind.DNN.Modules.DMX.Controls.PortalModuleBase.get_Query() at Bring2mind.DNN.Modules.DMX.Dispatch.MyInitialize() at Bring2mind.DNN.Modules.DMX.Dispatch.a(Object A_0, EventArgs A_1) at System.Web.UI.Control.OnInit(EventArgs e) at System.Web.UI.UserControl.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.AddedControl(Control control, Int32 index) at System.Web.UI.ControlCollection.Add(Control child) at DotNetNuke.UI.Skins.Skin.InjectModule(Control objPane, ModuleInfo objModule, PortalSettings PortalSettings)
Source:
Server Name: .....
The following Warning message is being written to the Event Viewer of the App server.
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 6/13/2007 6:13:56 PM
Event time (UTC): 6/13/2007 10:13:56 PM
Event ID: 60ed71fcd4f343709a40fdefab45cb9a
Event sequence: 2
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/770673771/Root/DotNetNuke_2-1-128262464118782648
Trust level: Full
Application Virtual Path: /DotNetNuke_2
Application Path: ....\DotNetNuke_2\website\
Machine name: .....
Process information:
Process ID: 5852
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Exception information:
Exception type: IOException
Exception message: The process cannot access the file '....\DotNetNuke_2\website\Portals\_default\Cache\UG9ydGFsMg==.resources' because it is being used by another process.
Request information:
Request URL: http://..../DotNetNuke_2/Default.aspx?TabId=229
Request path: /DotNetNuke_2/Default.aspx
User host address: ..........
User:
Is authenticated: False
Authentication Type:
Thread account name: .....
Thread information:
Thread ID: 66
Thread account name: .....
Is impersonating: True
Stack trace: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.Delete(String path)
at DotNetNuke.Services.Cache.FileBasedCachingProvider.FBCachingProvider.Remove(String CacheKey)
at DotNetNuke.Services.Cache.FileBasedCachingProvider.FBCachingProvider.Insert(String CacheKey, Object objObject, CacheDependency objDependency, DateTime AbsoluteExpiration, TimeSpan SlidingExpiration, Boolean PersistAppRestart)
at DotNetNuke.Common.Utilities.DataCache.SetCache(String CacheKey, Object objObject, TimeSpan SlidingExpiration, Boolean PersistAppRestart)
at DotNetNuke.Entities.Portals.PortalController.GetPortal(Int32 PortalId)
at DotNetNuke.Entities.Portals.PortalSettings.GetPortalSettings(Int32 TabId, PortalAliasInfo objPortalAliasInfo)
at DotNetNuke.Entities.Portals.PortalSettings..ctor(Int32 tabId, PortalAliasInfo objPortalAliasInfo)
at DotNetNuke.HttpModules.UrlRewriteModule.OnBeginRequest(Object s, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Custom event details:
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Can you please help?
Thanks,
Chhavi