I have migrated a very small site from Umbraco 5.0.1 to 5.1 and from SQL Compact to SQL 2008 and although the speed has increased I am seeing massive memory use!! After just a few pages loaded its up over 300Mb and then after a bit more 1.2GB (w2wp.exe). Recycling the App Pool obviously clears this but what is going on?
Anyone else experiencing the same?
I thought I would test to see if I had missed something in the migration by setting up a completely new site using the following process:
1. In Visual Studio Start a new MVC 3 Project (Razor Blank etc)
2. Use NuGet to pull in the Umbraco 5.1 Package
3. Compile (Using Either Debug or Release)
4. Setup the site in IIS, own App Pool, .NET 4 all pretty standard
5. Load the site in a browser, run the install and connect it up to an SQL 2008 DB
6. Login to the back office
7. Sit back and watch as the memory rises!!
I can't be the only one experiencing this... Can I?
I tried testing this following your step-by-step guide, but I don't get the same excessive use of memory. The w3wp.exe process stays more or less constant at 420MB.
One thing though, that you don't mention in your guide to testing this is setting permissions for the site. So just to make sure that your app pool identity has full read/write/modify permissions on the following folders:
App_Data
App_Plugins
Areas
Bin
Content
Scripts
Views
Let me know if this makes any difference. Also, if you could please post your log file located here \App_Data\Logs\UmbracoTraceLog.txt that could help us find a cause for the issue you are experiencing.
Thanks for the response. I tried you suggestions first by adding the IIS_IUSRS account to each of the folders and making sure the permission were copied down and this did nothing, Just to test I then tried adding the same permissions to the entire site but still nothing.
I am attaching my log file as requested. I really appreciate you taking the time to look at this for me.
2012-05-08 09:21:18,957 [6] INFO Umbraco.Cms.Web.Routing.DefaultRoutingEngine [(null)] - FindEntityByUrl for URL http://localhost:9000/aboutus took 186ms 2012-05-08 09:21:27,428 [8] INFO Umbraco.Cms.Web.Routing.DefaultRoutingEngine [(null)] - Resolving entity by Non-Domain URL 2012-05-08 09:21:27,506 [8] INFO Umbraco.Cms.Web.Routing.DefaultRoutingEngine [(null)] - FindEntityByUrl for URL http://localhost:9000/our-brands took 155ms 2012-05-08 09:21:30,929 [5] INFO Umbraco.Cms.Web.Routing.DefaultRoutingEngine [(null)] - Resolving entity by Non-Domain URL 2012-05-08 09:21:31,009 [5] INFO Umbraco.Cms.Web.Routing.DefaultRoutingEngine [(null)] - FindEntityByUrl for URL http://localhost:9000/creativity-store-programme took 172ms 2012-05-08 09:23:20,869 [1] INFO Umbraco.Cms.Web.System.PluginManager [(null)] - Start Initialise 2012-05-08 09:23:20,916 [1] INFO Umbraco.Cms.Web.System.PluginManager [(null)] - Finding plugin DLLs 2012-05-08 09:23:20,916 [1] INFO Umbraco.Cms.Web.System.PluginManager [(null)] - Finding plugin DLLs completed (took 5ms) 2012-05-08 09:23:20,932 [1] INFO Umbraco.Cms.Web.System.PluginManager [(null)] - Determining hash of plugins on disk 2012-05-08 09:23:20,932 [1] INFO Umbraco.Cms.Web.System.PluginManager [(null)] - Hash determined (took 5ms) 2012-05-08 09:23:20,932 [1] INFO Umbraco.Cms.Web.System.PluginManager [(null)] - No plugin changes detected 2012-05-08 09:23:20,963 [1] INFO Umbraco.Cms.Web.System.PluginManager [(null)] - End Initialise (took 59ms) 2012-05-08 09:23:20,963 [1] INFO Umbraco.Cms.Web.UI.MvcApplication [(null)] - Http application warmup 2012-05-08 09:23:20,979 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - Start AddDependencyDemandBuilder FrameworkSetup 2012-05-08 09:23:21,010 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - End AddDependencyDemandBuilder (took 34ms) 2012-05-08 09:23:21,025 [1] INFO Umbraco.Cms.Web.UmbracoWebApplication [(null)] - Start called. Product info: Umbraco 5.1 build 5.1.0.175 2012-05-08 09:23:21,025 [1] INFO Umbraco.Cms.Web.System.Boot.BootManager [(null)] - Created 2012-05-08 09:23:21,181 [1] INFO Umbraco.Cms.Web.System.Boot.BootManager [(null)] - Initialising container 2012-05-08 09:23:21,181 [1] INFO Umbraco.Cms.Web.System.Boot.BootManager [(null)] - Booting 2012-05-08 09:23:21,181 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - Start AddDependencyDemandBuilder UmbracoContainerBuilder`1 2012-05-08 09:23:21,197 [1] INFO Umbraco.Cms.Web.UmbracoWebApplication [(null)] - Container is building 2012-05-08 09:23:21,197 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - Start AddDependencyDemandBuilder WebTypesDemandBuilder 2012-05-08 09:23:21,213 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - End AddDependencyDemandBuilder (took 9ms) 2012-05-08 09:23:21,213 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - Start AddDependencyDemandBuilder MvcTypesDemandBuilder 2012-05-08 09:23:21,337 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - End AddDependencyDemandBuilder (took 128ms) 2012-05-08 09:23:21,337 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - Start AddDependencyDemandBuilder HiveDemandBuilder 2012-05-08 09:23:21,415 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - End AddDependencyDemandBuilder (took 74ms) 2012-05-08 09:23:21,415 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - Start AddDependencyDemandBuilder LoadFromPersistenceConfig 2012-05-08 09:23:21,447 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Calling setup module for nhibernate in Umbraco.Framework.Persistence.NHibernate 2012-05-08 09:23:21,447 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - Start AddDependencyDemandBuilder NHibernateDemandBuilder 2012-05-08 09:23:21,462 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - Start AddDependencyDemandBuilder NHibernateConfigBuilder 2012-05-08 09:23:21,478 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - End AddDependencyDemandBuilder (took 2ms) 2012-05-08 09:23:21,493 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - End AddDependencyDemandBuilder (took 35ms) 2012-05-08 09:23:21,493 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a bootstrapper for nhibernate 2012-05-08 09:23:21,493 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a ProviderDependencyHelper for nhibernate 2012-05-08 09:23:21,493 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Calling setup module for templates in Umbraco.Hive.Providers.IO 2012-05-08 09:23:21,509 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - Start AddDependencyDemandBuilder ProviderDemandBuilder 2012-05-08 09:23:21,509 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - End AddDependencyDemandBuilder (took 0ms) 2012-05-08 09:23:21,509 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a no-op bootstrapper for templates 2012-05-08 09:23:21,509 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a ProviderDependencyHelper for templates 2012-05-08 09:23:21,509 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Calling setup module for partials in Umbraco.Hive.Providers.IO 2012-05-08 09:23:21,525 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - Start AddDependencyDemandBuilder ProviderDemandBuilder 2012-05-08 09:23:21,525 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - End AddDependencyDemandBuilder (took 0ms) 2012-05-08 09:23:21,525 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a no-op bootstrapper for partials 2012-05-08 09:23:21,525 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a ProviderDependencyHelper for partials 2012-05-08 09:23:21,525 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Calling setup module for file-uploader in Umbraco.Hive.Providers.IO 2012-05-08 09:23:21,525 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - Start AddDependencyDemandBuilder ProviderDemandBuilder 2012-05-08 09:23:21,525 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - End AddDependencyDemandBuilder (took 0ms) 2012-05-08 09:23:21,525 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a no-op bootstrapper for file-uploader 2012-05-08 09:23:21,525 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a ProviderDependencyHelper for file-uploader 2012-05-08 09:23:21,525 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Calling setup module for scripts in Umbraco.Hive.Providers.IO 2012-05-08 09:23:21,525 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - Start AddDependencyDemandBuilder ProviderDemandBuilder 2012-05-08 09:23:21,525 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - End AddDependencyDemandBuilder (took 0ms) 2012-05-08 09:23:21,525 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a no-op bootstrapper for scripts 2012-05-08 09:23:21,525 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a ProviderDependencyHelper for scripts 2012-05-08 09:23:21,525 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Calling setup module for stylesheets in Umbraco.Hive.Providers.IO 2012-05-08 09:23:21,540 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - Start AddDependencyDemandBuilder ProviderDemandBuilder 2012-05-08 09:23:21,540 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - End AddDependencyDemandBuilder (took 0ms) 2012-05-08 09:23:21,540 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a no-op bootstrapper for stylesheets 2012-05-08 09:23:21,540 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a ProviderDependencyHelper for stylesheets 2012-05-08 09:23:21,540 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Calling setup module for macros in Umbraco.Hive.Providers.IO 2012-05-08 09:23:21,540 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - Start AddDependencyDemandBuilder ProviderDemandBuilder 2012-05-08 09:23:21,540 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - End AddDependencyDemandBuilder (took 0ms) 2012-05-08 09:23:21,540 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a no-op bootstrapper for macros 2012-05-08 09:23:21,540 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a ProviderDependencyHelper for macros 2012-05-08 09:23:21,540 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Calling setup module for macro-partials in Umbraco.Hive.Providers.IO 2012-05-08 09:23:21,540 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - Start AddDependencyDemandBuilder ProviderDemandBuilder 2012-05-08 09:23:21,540 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - End AddDependencyDemandBuilder (took 0ms) 2012-05-08 09:23:21,540 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a no-op bootstrapper for macro-partials 2012-05-08 09:23:21,540 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a ProviderDependencyHelper for macro-partials 2012-05-08 09:23:21,540 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Calling setup module for stubs in Umbraco.Hive.Providers.IO 2012-05-08 09:23:21,556 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - Start AddDependencyDemandBuilder ProviderDemandBuilder 2012-05-08 09:23:21,556 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - End AddDependencyDemandBuilder (took 0ms) 2012-05-08 09:23:21,556 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a no-op bootstrapper for stubs 2012-05-08 09:23:21,556 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a ProviderDependencyHelper for stubs 2012-05-08 09:23:21,556 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - End AddDependencyDemandBuilder (took 132ms) 2012-05-08 09:23:21,587 [1] INFO Umbraco.Cms.Web.DependencyManagement.UmbracoComponentRegistrar [(null)] - RegisterTasks start took 18ms 2012-05-08 09:23:21,587 [1] INFO Umbraco.Cms.Web.DependencyManagement.UmbracoComponentRegistrar [(null)] - RegisterTreeControllers start took 6ms 2012-05-08 09:23:21,603 [1] INFO Umbraco.Cms.Web.DependencyManagement.UmbracoComponentRegistrar [(null)] - RegisterPropertyEditors start took 7ms 2012-05-08 09:23:21,603 [1] INFO Umbraco.Cms.Web.DependencyManagement.UmbracoComponentRegistrar [(null)] - RegisterParameterEditors start took 5ms 2012-05-08 09:23:21,618 [1] INFO Umbraco.Cms.Web.DependencyManagement.UmbracoComponentRegistrar [(null)] - RegisterEditorControllers start took 7ms 2012-05-08 09:23:21,634 [1] INFO Umbraco.Cms.Web.DependencyManagement.UmbracoComponentRegistrar [(null)] - RegisterMenuItems start took 7ms 2012-05-08 09:23:21,634 [1] INFO Umbraco.Cms.Web.DependencyManagement.UmbracoComponentRegistrar [(null)] - RegisterSurfaceControllers start took 3ms 2012-05-08 09:23:21,650 [1] INFO Umbraco.Cms.Web.DependencyManagement.UmbracoComponentRegistrar [(null)] - RegisterDashboardFilters start took 3ms 2012-05-08 09:23:21,650 [1] INFO Umbraco.Cms.Web.DependencyManagement.UmbracoComponentRegistrar [(null)] - RegisterDashboardMatchRules start took 1ms 2012-05-08 09:23:21,665 [1] INFO Umbraco.Cms.Web.DependencyManagement.UmbracoComponentRegistrar [(null)] - RegisterPermissions start took 7ms 2012-05-08 09:23:21,665 [1] INFO Umbraco.Cms.Web.DependencyManagement.UmbracoComponentRegistrar [(null)] - RegisterMacroEngines start took 3ms 2012-05-08 09:23:21,665 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - Start AddDependencyDemandBuilder ModelMappingsDemandBuilder 2012-05-08 09:23:21,665 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - End AddDependencyDemandBuilder (took 4ms) 2012-05-08 09:23:21,681 [1] INFO Umbraco.Framework.Localization.TextManager [(null)] - Start ReloadTexts 2012-05-08 09:23:21,696 [1] INFO Umbraco.Framework.Localization.TextManager [(null)] - End ReloadTexts (took 19ms) 2012-05-08 09:23:21,712 [1] INFO Umbraco.Cms.Web.UmbracoWebApplication [(null)] - Container building is complete 2012-05-08 09:23:21,712 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - End AddDependencyDemandBuilder (took 524ms) 2012-05-08 09:23:21,837 [1] INFO Umbraco.Cms.Web.System.Boot.BootManager [(null)] - Booting CmsBootstrapper 2012-05-08 09:23:22,742 [1] INFO Umbraco.Cms.Web.System.Boot.BootManager [(null)] - Registering MVC areas 2012-05-08 09:23:22,742 [1] INFO Umbraco.Cms.Web.System.Boot.BootManager [(null)] - Registering custom MVC routes 2012-05-08 09:23:22,742 [1] INFO Umbraco.Cms.Web.System.Boot.BootManager [(null)] - Booting RenderBootstrapper 2012-05-08 09:23:22,757 [1] INFO Umbraco.Cms.Web.System.Boot.BootManager [(null)] - Registering MVC global filters 2012-05-08 09:23:22,757 [1] INFO Umbraco.Cms.Web.System.Boot.BootManager [(null)] - Registering MVC default routes 2012-05-08 09:23:22,757 [1] INFO Umbraco.Cms.Web.Tasks.ConfigurationTaskBuilder [(null)] - Executing Umbraco.Cms.Web.Tasks.ConfigurationTaskBuilder 2012-05-08 09:23:22,773 [1] INFO Umbraco.Cms.Web.Tasks.ConfigurationTaskBuilder [(null)] - Building configuration tasks 2012-05-08 09:23:22,788 [1] INFO Umbraco.Cms.Web.Tasks.ConfigurationTaskBuilder [(null)] - Found post-package-install config task of type DisplayUITask for package, registering it as systeminfo-post-package-install 2012-05-08 09:23:22,788 [1] INFO Umbraco.Cms.Web.Tasks.ConfigurationTaskBuilder [(null)] - End building configuration tasks (took 17ms) 2012-05-08 09:23:22,788 [1] INFO Umbraco.Cms.Web.System.Boot.BootManager [(null)] - Application start took 1767ms 2012-05-08 09:23:24,738 [5] INFO Umbraco.Cms.Web.Routing.DefaultRoutingEngine [(null)] - Resolving entity by Non-Domain URL 2012-05-08 09:23:25,534 [5] INFO Umbraco.Cms.Web.Routing.DefaultRoutingEngine [(null)] - FindEntityByUrl for URL http://localhost:9000/ took 2401ms 2012-05-08 09:23:29,263 [5] WARN NHibernate.Engine.StatefulPersistenceContext.ProxyWarnLog [(null)] - Narrowing proxy to Umbraco.Framework.Persistence.RdbmsModel.AttributeSchemaDefinition - this operation breaks == 2012-05-08 09:23:31,353 [5] WARN NHibernate.Engine.StatefulPersistenceContext.ProxyWarnLog [(null)] - Narrowing proxy to Umbraco.Framework.Persistence.RdbmsModel.AttributeSchemaDefinition - this operation breaks == 2012-05-08 09:27:09,740 [20] INFO Umbraco.Cms.Web.Routing.DefaultRoutingEngine [(null)] - Resolving entity by Non-Domain URL
Interesting but probably obvious is that the less content on the page the smaller the increments but with full content it jumps by upto 100Mb! which as the entire site and Database come to only 30Mb confuses me a little.
Im happy to run any debugging but not sure really how I can trace what's going on, any ideas?
I found SQL CE to be to slow so switch to SQL 2008. I don't currently have the DevDataSet installed.
Just some basic templates, pages and macros. But I am also testing a fresh install which has only one page, one template and no macros and it does rise, just very slowly.
We're currently experiencing the same; v5.1, SQL Server 2008 and easily 900MB (idle) - 1.5GB (active) memory usage, within a minute or two of site load.
I've set NETWORK SERVICE, IIS_IUSRS and the ASP.NET v4.0 app pool to have full modify/read/write permissions on the root folder just in case I missed any subfolders, but no change.
This seems like I've configured something incorrectly - any suggestions?
Are you running a fresh 5.1 instance or has it been upgraded from an earilier version?
Just to verify are you running in "Integrated Mode" ?
You only need to give the following folders Modify permissions for the Application Pool identity (but yes giving the permissions you did would ensure that its not a permissions issue).
App_Data
App_Plugins
Areas
Bin
Content
Scripts
Views
Is this an error that occured after you moved the site to a server or is it also happning on your local machines?
Yes, I can confirm that the app pool's running in Integrated pipeline mode. As for the permissions; exactly, I wanted to be absolutely certain by using blanket coverage.
I wondered if maybe I should take the vanilla 5.1 installation and manually add in my views etc., rather than the other way round as described in the instructions?
I've not tried running the site on a local machine; we've got a Amazon cloud instance to play with, so we've been testing directly on there.
I am running on a fresh copy of 5.1 with view, macros. styles etc put in after and yep memory shoots up. It is still running on my local machine as I cannot put it onto one of our servers as it is.
I have run it on another machine and had the same problem.
Yup, thats a good point. @Dan and @Chris any of you using Macro caching ?
@Chris I have still not been able to reproduce the issue with memory growing on a fresh 5.1 site. Is there any chance you can record a screenr (from setting up the site to seeing the memory grow)?
@Dan I have seen a few reports where the issues seems to be related to upgrading, so if its possible for you to do it from a fresh 5.1 (maybe just a single doc type, template and page) to see if it makes a difference for you then I would encourage you to try it out - and let us know the result.
Re: Macro caching: not to my knowledge. Also, we've only got one MacroPartial in the site, and after testing with that removed, there's no improvement in memory consumption. I'm guessing, though, that RenderMacro might be used internally?
As for a fresh install, I've just done that and installed the Dev Dataset starter package too to get some content in there that's not ours. It's not as dramatic, certainly, but after five minutes clicking around, memory consumption of the w3wp.exe process is at 432MB - this still seems high to me. The site is, however, lightning fast compared to ours which consistently requires 30 - 60 seconds to load a page.
I get the feeling we're doing something fundamentally wrong in the way we're coding our site using Umbraco 5. Any obvious gotchas?
@Dan The only obvious one that I can think of right now is .ToList() - don't use it, as it would cause the objects to be loaded in memory. Other then that its difficult to say without seeing the code. As for the 432MB w3wp.exe process I'm afraid that is "normal" for the current state of v5.
Sorry for not replying earlier but I took a well deserved holiday.
I have spent the last day trying to debug this issue by setting up a Fresh Site and porting things across bit by bit. Really simple, 1 Page, using my Standard Content Template. Few images on the page but not complex code and no calls to ToList().
I then use openload to hit the site with loads of traffic.
Althought the climb in memory is far slower it is still raising over time.
I have been cleaning out the .NET temp files between tests and I have also ran ANTS Memory Profiler on this basic site and I see large amounts of Unused memory allocated to .NET which betweem snapshots is what is rising!
Snap 1
Snap 2
Hope this might shed some light on the problem with someone. I am stumped...
Hi, I think I might have got to the bottom of the momory issue but I would like validation.
I have the following setup. A basic site with one page a the following templates
Templates
- Layout
- Homepage
The "Home" (Content Page) uses "Home" (Template). With this I don't think there is a leak... however when I add a second child template as follows
Templates
- Layout
- Homepage
- Content Page
I get a leak....Slow at this point but a leak. I have profiled the site with Ants Memory profiler and seen loads of memory being held by ReaderWriterCount[] and the memory seems to contain nulls.
I tracing back up the call stack I can see references to an enermuration of templates. I can't seem to get the source from codeplex as it always seems down.
I found an interesting comment about the ReaderWriterCount on stackoverflow which point to the possibility that it's just not being disposed of:
Umbraco 5.1 Memory Leak?
I have migrated a very small site from Umbraco 5.0.1 to 5.1 and from SQL Compact to SQL 2008 and although the speed has increased I am seeing massive memory use!! After just a few pages loaded its up over 300Mb and then after a bit more 1.2GB (w2wp.exe). Recycling the App Pool obviously clears this but what is going on?
Anyone else experiencing the same?
I thought I would test to see if I had missed something in the migration by setting up a completely new site using the following process:
1. In Visual Studio Start a new MVC 3 Project (Razor Blank etc)
2. Use NuGet to pull in the Umbraco 5.1 Package
3. Compile (Using Either Debug or Release)
4. Setup the site in IIS, own App Pool, .NET 4 all pretty standard
5. Load the site in a browser, run the install and connect it up to an SQL 2008 DB
6. Login to the back office
7. Sit back and watch as the memory rises!!
I can't be the only one experiencing this... Can I?
Hi Chris,
I tried testing this following your step-by-step guide, but I don't get the same excessive use of memory. The w3wp.exe process stays more or less constant at 420MB.
One thing though, that you don't mention in your guide to testing this is setting permissions for the site. So just to make sure that your app pool identity has full read/write/modify permissions on the following folders:
Let me know if this makes any difference. Also, if you could please post your log file located here \App_Data\Logs\UmbracoTraceLog.txt that could help us find a cause for the issue you are experiencing.
Thanks,
Morten
Hi Morten,
Thanks for the response. I tried you suggestions first by adding the IIS_IUSRS account to each of the folders and making sure the permission were copied down and this did nothing, Just to test I then tried adding the same permissions to the entire site but still nothing.
I am attaching my log file as requested. I really appreciate you taking the time to look at this for me.
2012-05-08 09:21:18,957 [6] INFO Umbraco.Cms.Web.Routing.DefaultRoutingEngine [(null)] - FindEntityByUrl for URL http://localhost:9000/aboutus took 186ms
2012-05-08 09:21:27,428 [8] INFO Umbraco.Cms.Web.Routing.DefaultRoutingEngine [(null)] - Resolving entity by Non-Domain URL
2012-05-08 09:21:27,506 [8] INFO Umbraco.Cms.Web.Routing.DefaultRoutingEngine [(null)] - FindEntityByUrl for URL http://localhost:9000/our-brands took 155ms
2012-05-08 09:21:30,929 [5] INFO Umbraco.Cms.Web.Routing.DefaultRoutingEngine [(null)] - Resolving entity by Non-Domain URL
2012-05-08 09:21:31,009 [5] INFO Umbraco.Cms.Web.Routing.DefaultRoutingEngine [(null)] - FindEntityByUrl for URL http://localhost:9000/creativity-store-programme took 172ms
2012-05-08 09:23:20,869 [1] INFO Umbraco.Cms.Web.System.PluginManager [(null)] - Start Initialise
2012-05-08 09:23:20,916 [1] INFO Umbraco.Cms.Web.System.PluginManager [(null)] - Finding plugin DLLs
2012-05-08 09:23:20,916 [1] INFO Umbraco.Cms.Web.System.PluginManager [(null)] - Finding plugin DLLs completed (took 5ms)
2012-05-08 09:23:20,932 [1] INFO Umbraco.Cms.Web.System.PluginManager [(null)] - Determining hash of plugins on disk
2012-05-08 09:23:20,932 [1] INFO Umbraco.Cms.Web.System.PluginManager [(null)] - Hash determined (took 5ms)
2012-05-08 09:23:20,932 [1] INFO Umbraco.Cms.Web.System.PluginManager [(null)] - No plugin changes detected
2012-05-08 09:23:20,963 [1] INFO Umbraco.Cms.Web.System.PluginManager [(null)] - End Initialise (took 59ms)
2012-05-08 09:23:20,963 [1] INFO Umbraco.Cms.Web.UI.MvcApplication [(null)] - Http application warmup
2012-05-08 09:23:20,979 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - Start AddDependencyDemandBuilder FrameworkSetup
2012-05-08 09:23:21,010 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - End AddDependencyDemandBuilder (took 34ms)
2012-05-08 09:23:21,025 [1] INFO Umbraco.Cms.Web.UmbracoWebApplication [(null)] - Start called. Product info: Umbraco 5.1 build 5.1.0.175
2012-05-08 09:23:21,025 [1] INFO Umbraco.Cms.Web.System.Boot.BootManager [(null)] - Created
2012-05-08 09:23:21,181 [1] INFO Umbraco.Cms.Web.System.Boot.BootManager [(null)] - Initialising container
2012-05-08 09:23:21,181 [1] INFO Umbraco.Cms.Web.System.Boot.BootManager [(null)] - Booting
2012-05-08 09:23:21,181 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - Start AddDependencyDemandBuilder UmbracoContainerBuilder`1
2012-05-08 09:23:21,197 [1] INFO Umbraco.Cms.Web.UmbracoWebApplication [(null)] - Container is building
2012-05-08 09:23:21,197 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - Start AddDependencyDemandBuilder WebTypesDemandBuilder
2012-05-08 09:23:21,213 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - End AddDependencyDemandBuilder (took 9ms)
2012-05-08 09:23:21,213 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - Start AddDependencyDemandBuilder MvcTypesDemandBuilder
2012-05-08 09:23:21,337 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - End AddDependencyDemandBuilder (took 128ms)
2012-05-08 09:23:21,337 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - Start AddDependencyDemandBuilder HiveDemandBuilder
2012-05-08 09:23:21,415 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - End AddDependencyDemandBuilder (took 74ms)
2012-05-08 09:23:21,415 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - Start AddDependencyDemandBuilder LoadFromPersistenceConfig
2012-05-08 09:23:21,447 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Calling setup module for nhibernate in Umbraco.Framework.Persistence.NHibernate
2012-05-08 09:23:21,447 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - Start AddDependencyDemandBuilder NHibernateDemandBuilder
2012-05-08 09:23:21,462 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - Start AddDependencyDemandBuilder NHibernateConfigBuilder
2012-05-08 09:23:21,478 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - End AddDependencyDemandBuilder (took 2ms)
2012-05-08 09:23:21,493 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - End AddDependencyDemandBuilder (took 35ms)
2012-05-08 09:23:21,493 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a bootstrapper for nhibernate
2012-05-08 09:23:21,493 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a ProviderDependencyHelper for nhibernate
2012-05-08 09:23:21,493 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Calling setup module for templates in Umbraco.Hive.Providers.IO
2012-05-08 09:23:21,509 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - Start AddDependencyDemandBuilder ProviderDemandBuilder
2012-05-08 09:23:21,509 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - End AddDependencyDemandBuilder (took 0ms)
2012-05-08 09:23:21,509 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a no-op bootstrapper for templates
2012-05-08 09:23:21,509 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a ProviderDependencyHelper for templates
2012-05-08 09:23:21,509 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Calling setup module for partials in Umbraco.Hive.Providers.IO
2012-05-08 09:23:21,525 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - Start AddDependencyDemandBuilder ProviderDemandBuilder
2012-05-08 09:23:21,525 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - End AddDependencyDemandBuilder (took 0ms)
2012-05-08 09:23:21,525 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a no-op bootstrapper for partials
2012-05-08 09:23:21,525 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a ProviderDependencyHelper for partials
2012-05-08 09:23:21,525 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Calling setup module for file-uploader in Umbraco.Hive.Providers.IO
2012-05-08 09:23:21,525 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - Start AddDependencyDemandBuilder ProviderDemandBuilder
2012-05-08 09:23:21,525 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - End AddDependencyDemandBuilder (took 0ms)
2012-05-08 09:23:21,525 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a no-op bootstrapper for file-uploader
2012-05-08 09:23:21,525 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a ProviderDependencyHelper for file-uploader
2012-05-08 09:23:21,525 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Calling setup module for scripts in Umbraco.Hive.Providers.IO
2012-05-08 09:23:21,525 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - Start AddDependencyDemandBuilder ProviderDemandBuilder
2012-05-08 09:23:21,525 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - End AddDependencyDemandBuilder (took 0ms)
2012-05-08 09:23:21,525 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a no-op bootstrapper for scripts
2012-05-08 09:23:21,525 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a ProviderDependencyHelper for scripts
2012-05-08 09:23:21,525 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Calling setup module for stylesheets in Umbraco.Hive.Providers.IO
2012-05-08 09:23:21,540 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - Start AddDependencyDemandBuilder ProviderDemandBuilder
2012-05-08 09:23:21,540 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - End AddDependencyDemandBuilder (took 0ms)
2012-05-08 09:23:21,540 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a no-op bootstrapper for stylesheets
2012-05-08 09:23:21,540 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a ProviderDependencyHelper for stylesheets
2012-05-08 09:23:21,540 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Calling setup module for macros in Umbraco.Hive.Providers.IO
2012-05-08 09:23:21,540 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - Start AddDependencyDemandBuilder ProviderDemandBuilder
2012-05-08 09:23:21,540 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - End AddDependencyDemandBuilder (took 0ms)
2012-05-08 09:23:21,540 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a no-op bootstrapper for macros
2012-05-08 09:23:21,540 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a ProviderDependencyHelper for macros
2012-05-08 09:23:21,540 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Calling setup module for macro-partials in Umbraco.Hive.Providers.IO
2012-05-08 09:23:21,540 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - Start AddDependencyDemandBuilder ProviderDemandBuilder
2012-05-08 09:23:21,540 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - End AddDependencyDemandBuilder (took 0ms)
2012-05-08 09:23:21,540 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a no-op bootstrapper for macro-partials
2012-05-08 09:23:21,540 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a ProviderDependencyHelper for macro-partials
2012-05-08 09:23:21,540 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Calling setup module for stubs in Umbraco.Hive.Providers.IO
2012-05-08 09:23:21,556 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - Start AddDependencyDemandBuilder ProviderDemandBuilder
2012-05-08 09:23:21,556 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - End AddDependencyDemandBuilder (took 0ms)
2012-05-08 09:23:21,556 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a no-op bootstrapper for stubs
2012-05-08 09:23:21,556 [1] INFO Umbraco.Hive.DependencyManagement.ProviderDemandRunner [(null)] - Registering a ProviderDependencyHelper for stubs
2012-05-08 09:23:21,556 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - End AddDependencyDemandBuilder (took 132ms)
2012-05-08 09:23:21,587 [1] INFO Umbraco.Cms.Web.DependencyManagement.UmbracoComponentRegistrar [(null)] - RegisterTasks start took 18ms
2012-05-08 09:23:21,587 [1] INFO Umbraco.Cms.Web.DependencyManagement.UmbracoComponentRegistrar [(null)] - RegisterTreeControllers start took 6ms
2012-05-08 09:23:21,603 [1] INFO Umbraco.Cms.Web.DependencyManagement.UmbracoComponentRegistrar [(null)] - RegisterPropertyEditors start took 7ms
2012-05-08 09:23:21,603 [1] INFO Umbraco.Cms.Web.DependencyManagement.UmbracoComponentRegistrar [(null)] - RegisterParameterEditors start took 5ms
2012-05-08 09:23:21,618 [1] INFO Umbraco.Cms.Web.DependencyManagement.UmbracoComponentRegistrar [(null)] - RegisterEditorControllers start took 7ms
2012-05-08 09:23:21,634 [1] INFO Umbraco.Cms.Web.DependencyManagement.UmbracoComponentRegistrar [(null)] - RegisterMenuItems start took 7ms
2012-05-08 09:23:21,634 [1] INFO Umbraco.Cms.Web.DependencyManagement.UmbracoComponentRegistrar [(null)] - RegisterSurfaceControllers start took 3ms
2012-05-08 09:23:21,650 [1] INFO Umbraco.Cms.Web.DependencyManagement.UmbracoComponentRegistrar [(null)] - RegisterDashboardFilters start took 3ms
2012-05-08 09:23:21,650 [1] INFO Umbraco.Cms.Web.DependencyManagement.UmbracoComponentRegistrar [(null)] - RegisterDashboardMatchRules start took 1ms
2012-05-08 09:23:21,665 [1] INFO Umbraco.Cms.Web.DependencyManagement.UmbracoComponentRegistrar [(null)] - RegisterPermissions start took 7ms
2012-05-08 09:23:21,665 [1] INFO Umbraco.Cms.Web.DependencyManagement.UmbracoComponentRegistrar [(null)] - RegisterMacroEngines start took 3ms
2012-05-08 09:23:21,665 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - Start AddDependencyDemandBuilder ModelMappingsDemandBuilder
2012-05-08 09:23:21,665 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - End AddDependencyDemandBuilder (took 4ms)
2012-05-08 09:23:21,681 [1] INFO Umbraco.Framework.Localization.TextManager [(null)] - Start ReloadTexts
2012-05-08 09:23:21,696 [1] INFO Umbraco.Framework.Localization.TextManager [(null)] - End ReloadTexts (took 19ms)
2012-05-08 09:23:21,712 [1] INFO Umbraco.Cms.Web.UmbracoWebApplication [(null)] - Container building is complete
2012-05-08 09:23:21,712 [1] INFO Umbraco.Framework.DependencyManagement.AbstractContainerBuilder [(null)] - End AddDependencyDemandBuilder (took 524ms)
2012-05-08 09:23:21,837 [1] INFO Umbraco.Cms.Web.System.Boot.BootManager [(null)] - Booting CmsBootstrapper
2012-05-08 09:23:22,742 [1] INFO Umbraco.Cms.Web.System.Boot.BootManager [(null)] - Registering MVC areas
2012-05-08 09:23:22,742 [1] INFO Umbraco.Cms.Web.System.Boot.BootManager [(null)] - Registering custom MVC routes
2012-05-08 09:23:22,742 [1] INFO Umbraco.Cms.Web.System.Boot.BootManager [(null)] - Booting RenderBootstrapper
2012-05-08 09:23:22,757 [1] INFO Umbraco.Cms.Web.System.Boot.BootManager [(null)] - Registering MVC global filters
2012-05-08 09:23:22,757 [1] INFO Umbraco.Cms.Web.System.Boot.BootManager [(null)] - Registering MVC default routes
2012-05-08 09:23:22,757 [1] INFO Umbraco.Cms.Web.Tasks.ConfigurationTaskBuilder [(null)] - Executing Umbraco.Cms.Web.Tasks.ConfigurationTaskBuilder
2012-05-08 09:23:22,773 [1] INFO Umbraco.Cms.Web.Tasks.ConfigurationTaskBuilder [(null)] - Building configuration tasks
2012-05-08 09:23:22,788 [1] INFO Umbraco.Cms.Web.Tasks.ConfigurationTaskBuilder [(null)] - Found post-package-install config task of type DisplayUITask for package, registering it as systeminfo-post-package-install
2012-05-08 09:23:22,788 [1] INFO Umbraco.Cms.Web.Tasks.ConfigurationTaskBuilder [(null)] - End building configuration tasks (took 17ms)
2012-05-08 09:23:22,788 [1] INFO Umbraco.Cms.Web.System.Boot.BootManager [(null)] - Application start took 1767ms
2012-05-08 09:23:24,738 [5] INFO Umbraco.Cms.Web.Routing.DefaultRoutingEngine [(null)] - Resolving entity by Non-Domain URL
2012-05-08 09:23:25,534 [5] INFO Umbraco.Cms.Web.Routing.DefaultRoutingEngine [(null)] - FindEntityByUrl for URL http://localhost:9000/ took 2401ms
2012-05-08 09:23:29,263 [5] WARN NHibernate.Engine.StatefulPersistenceContext.ProxyWarnLog [(null)] - Narrowing proxy to Umbraco.Framework.Persistence.RdbmsModel.AttributeSchemaDefinition - this operation breaks ==
2012-05-08 09:23:31,353 [5] WARN NHibernate.Engine.StatefulPersistenceContext.ProxyWarnLog [(null)] - Narrowing proxy to Umbraco.Framework.Persistence.RdbmsModel.AttributeSchemaDefinition - this operation breaks ==
2012-05-08 09:27:09,740 [20] INFO Umbraco.Cms.Web.Routing.DefaultRoutingEngine [(null)] - Resolving entity by Non-Domain URL
Hi Chris,
Just to make sure - after updating your site with the IIS_IUSRS permission was the w3wp process still growing to 1.2GB ?
At a glance your log file doesn't have anything out of the ordinary, but I'll have a closer look and compare to the log file produced by my own test.
Have you tried to see if there is any difference in behaviour between using SQL and SQL CE? Also, are you using the DevDataSet for testing your site?
- Morten
Hi,
Yes it is still going up every page request.
Interesting but probably obvious is that the less content on the page the smaller the increments but with full content it jumps by upto 100Mb! which as the entire site and Database come to only 30Mb confuses me a little.
Im happy to run any debugging but not sure really how I can trace what's going on, any ideas?
I found SQL CE to be to slow so switch to SQL 2008. I don't currently have the DevDataSet installed.
Just some basic templates, pages and macros. But I am also testing a fresh install which has only one page, one template and no macros and it does rise, just very slowly.
Chris
We're currently experiencing the same; v5.1, SQL Server 2008 and easily 900MB (idle) - 1.5GB (active) memory usage, within a minute or two of site load.
I've set NETWORK SERVICE, IIS_IUSRS and the ASP.NET v4.0 app pool to have full modify/read/write permissions on the root folder just in case I missed any subfolders, but no change.
This seems like I've configured something incorrectly - any suggestions?
Dan
Hi Dan,
Are you running a fresh 5.1 instance or has it been upgraded from an earilier version?
Just to verify are you running in "Integrated Mode" ?
You only need to give the following folders Modify permissions for the Application Pool identity (but yes giving the permissions you did would ensure that its not a permissions issue).
Is this an error that occured after you moved the site to a server or is it also happning on your local machines?
- Morten
Hi Morten,
Yes, I can confirm that the app pool's running in Integrated pipeline mode. As for the permissions; exactly, I wanted to be absolutely certain by using blanket coverage.
This was an upgrade from a 5.0.x application - I followed the instructions below the download link here: http://umbraco.codeplex.com/releases/view/86766
I wondered if maybe I should take the vanilla 5.1 installation and manually add in my views etc., rather than the other way round as described in the instructions?
I've not tried running the site on a local machine; we've got a Amazon cloud instance to play with, so we've been testing directly on there.
Dan
Hi,
I am running on a fresh copy of 5.1 with view, macros. styles etc put in after and yep memory shoots up. It is still running on my local machine as I cannot put it onto one of our servers as it is.
I have run it on another machine and had the same problem.
Chris
Could it be related to this issue? http://issues.umbraco.org/issue/U5-673#comment=67-1836
Jeroen
Yup, thats a good point. @Dan and @Chris any of you using Macro caching ?
@Chris I have still not been able to reproduce the issue with memory growing on a fresh 5.1 site. Is there any chance you can record a screenr (from setting up the site to seeing the memory grow)?
@Dan I have seen a few reports where the issues seems to be related to upgrading, so if its possible for you to do it from a fresh 5.1 (maybe just a single doc type, template and page) to see if it makes a difference for you then I would encourage you to try it out - and let us know the result.
- Morten
Re: Macro caching: not to my knowledge. Also, we've only got one MacroPartial in the site, and after testing with that removed, there's no improvement in memory consumption. I'm guessing, though, that RenderMacro might be used internally?
As for a fresh install, I've just done that and installed the Dev Dataset starter package too to get some content in there that's not ours. It's not as dramatic, certainly, but after five minutes clicking around, memory consumption of the w3wp.exe process is at 432MB - this still seems high to me. The site is, however, lightning fast compared to ours which consistently requires 30 - 60 seconds to load a page.
I get the feeling we're doing something fundamentally wrong in the way we're coding our site using Umbraco 5. Any obvious gotchas?
Dan
@Dan The only obvious one that I can think of right now is .ToList() - don't use it, as it would cause the objects to be loaded in memory. Other then that its difficult to say without seeing the code.
As for the 432MB w3wp.exe process I'm afraid that is "normal" for the current state of v5.
- Morten
Hi Morton,
Sorry for not replying earlier but I took a well deserved holiday.
I have spent the last day trying to debug this issue by setting up a Fresh Site and porting things across bit by bit. Really simple, 1 Page, using my Standard Content Template. Few images on the page but not complex code and no calls to ToList().
I then use openload to hit the site with loads of traffic.
http://openwebload.sourceforge.net/
Run cmd > openload.exe http://localhost:9001 1000
Althought the climb in memory is far slower it is still raising over time.
I have been cleaning out the .NET temp files between tests and I have also ran ANTS Memory Profiler on this basic site and I see large amounts of Unused memory allocated to .NET which betweem snapshots is what is rising!
Snap 1
Snap 2
Hope this might shed some light on the problem with someone. I am stumped...
Hi, I think I might have got to the bottom of the momory issue but I would like validation.
I have the following setup. A basic site with one page a the following templates
Templates
The "Home" (Content Page) uses "Home" (Template). With this I don't think there is a leak... however when I add a second child template as follows
Templates
I get a leak....Slow at this point but a leak. I have profiled the site with Ants Memory profiler and seen loads of memory being held by ReaderWriterCount[] and the memory seems to contain nulls.
I tracing back up the call stack I can see references to an enermuration of templates. I can't seem to get the source from codeplex as it always seems down.
I found an interesting comment about the ReaderWriterCount on stackoverflow which point to the possibility that it's just not being disposed of:
http://stackoverflow.com/questions/4066286/getting-an-out-of-memory-exception-with-system-threading-readerwritercount
Hoping for some response if possible. Thanks
Chris
is working on a reply...