Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Pickels 75 posts 108 karma points
    Oct 11, 2010 @ 20:41
    Pickels
    0

    w3wp.exe - memory usage 4.5.2 .net 4

    Hello,

    I notice when I use the back-end of Umbraco for a while the w3wp.exe is using a lot of memory. The max so far is 700mb after a couple of hours. 

    Anybody maybe know why this is happening? I am guessing it's not normal.

  • Pickels 75 posts 108 karma points
    Oct 11, 2010 @ 21:49
    Pickels
    0

    Are there any logs I can check in IIS maybe something is throwing errors? I have the same on my VPS also which is a little problematic since it doesn't have that much ram. 

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Oct 11, 2010 @ 22:25
    Lee Kelleher
    0

    Try the Windows' Event Viewer ... see if there are any ASP.NET exceptions in there?

    Have you looked at the Umbraco logs in the database? (in the "umbracoLog" table) - or try installing the Log Manager package?

    Cheers, Lee.

  • Niels Hartvig 1951 posts 2391 karma points c-trib
    Oct 11, 2010 @ 22:34
    Niels Hartvig
    0

    Have you checked how much RAM is allowed for the app pool / .NET in general. It doesn't have to be a memory leak - if .NET haven't reached the maximum RAM allowed it could continue to consume until it have to release memory (logic of the garbage collector).

  • Pickels 75 posts 108 karma points
    Oct 11, 2010 @ 22:42
    Pickels
    0

    @Lee Kelleher: Nothing in the Event Viewer that looks weird. In the Umbraco log the last 25 entries are Logheader: Open, Open, ... I guess that's normal?

    @Niels Hartvig: Would that be app pool > Advanced Settings > Recycling > Virtual Memory Limit?

  • Niels Hartvig 1951 posts 2391 karma points c-trib
    Oct 11, 2010 @ 22:45
    Niels Hartvig
    0

    Honestly can't remember - luckily for the stability of the Umbraco.org / Our Umbraco websites I'm no longer the server guy :-D

  • Pickels 75 posts 108 karma points
    Oct 11, 2010 @ 23:12
    Pickels
    0

    app pool > Advanced Settings > Recycling > Virtual Memory Limit : 80000 seems to work okay. Not sure how snappy the back-end is between recycles but didn't notice anything bad. It also looks like it starts up a second process and kill the first one so that's maybe why performance doesn't drop?

  • Rich Green 2246 posts 4008 karma points
    Oct 12, 2010 @ 08:51
  • Pickels 75 posts 108 karma points
    Oct 13, 2010 @ 14:03
    Pickels
    0

    It seems when you set a virtual memory limit I get: "System.Web.UI.ViewStateException: Invalid viewstate." in between recycles. So I guess setting a virtual limit is a bad idea? 

    I guess that means I have to find a different solution for my original problem? I was wondering am I the only one with this memory problem or is it just bad configuration of my IIS? Each time you click on a node or load a page on the front-end the memory for w3wp.exe process goes up by 2mb. 

     

  • pikkenix 17 posts 37 karma points
    Oct 14, 2010 @ 10:37
    pikkenix
    0

    I have the exact same issues with my Umbracosites (other sites including wordpress does not show the same behavior). Every node consumes an unbeleiveble amount of memory for the w3wp-process (a few mb per node).

    Have been struggling with this a couple of months without any success (read most memoryrelated posts about umbraco). The sites keep consuming memory until the server craches with an OutOfMemory-exception. Only thing so far is to buy more memory...

    My sites hosted on a virtual server running windows 2008 (IIS7), 1,5GB memory at the moment (one site on this machine that works, the site has about 300 nodes), the site uses ImageGen (version 2.0.1) with big images a lot (maybe thats the bad guy?).

  • Rich Green 2246 posts 4008 karma points
    Oct 14, 2010 @ 10:39
    Rich Green
    0

    Possibly not related but ensure you've installed the fix for a bug in that version of imagegen http://our.umbraco.org/projects/website-utilities/imagegen/imagegen-bugs/2982-[UPDATE]-Fix-to-caching-bug-in-201

    Rich

  • pikkenix 17 posts 37 karma points
    Oct 14, 2010 @ 10:56
    pikkenix
    0

    Fix, installed already. Don't know why it sais 2.0.1 in the packades-section...

  • Pickels 75 posts 108 karma points
    Oct 19, 2010 @ 15:50
    Pickels
    0

    Finally took some time to try and fix it. I think the invalid viewstate is caused because I am on a VPS (not 100% sure). So I googled some and found you can specify a machinekey in your web.config.

    So to summarize this is what I did:

    - Right click the app pool of the Umbraco site
    - Advanced Settings > Recycling > Private Memory Limit(KB) > 80000 (I guess 80k is enough?)
    - In your web.config > system.web > add a machinekey
      On this website you can generate one:  http://aspnetresources.com/tools/machineKey
      So your web.config should look like this:

    <system.web>
      <machineKey validationKey="long key" decryptionKey="long key" validation="SHA1" decryption="AES" />
      ...

    This seems to be working. If there are any server admins out there who can give more input on this issue I would appreciate it.

  • Jeff Grine 149 posts 189 karma points
    Oct 19, 2010 @ 17:50
    Jeff Grine
    0

    Not a server admin, but machineKey is already specified in machine.config, so you shouldn't really be gaining anything by adding it to web.config. The only time you should have to mess with it is if you're doing load balancing and need it synched up on two different machines. Since a VPS is really still an isolated machine with it's own machine.config, it shouldn't be the culprit. That said, I've frequently seen this error on single web servers and I've never been able to do anything about it. It's always fairly rare, so difficult to troubleshoot.

  • Pickels 75 posts 108 karma points
    Oct 19, 2010 @ 21:14
    Pickels
    0

    I know how to replicate the error. If you set the memory to like 80k and then go to the backend click on some node. Then you go to the front-end and you click around until the memory reaches 80k. Next you see an other w3wp.exe process started and the old one gets killed because the app pool recycles. If you then go back to your back-end and publish that node it will throw the viewstate error. I think this happens because the viewstate and server are out of sync?

    Problem is that if the process is reaching 80k all the time you can't publish anything because the viewstate and server are out of sync the whole time.

    Not sure what to do really. Maybe I am doing something completely wrong. Now it's just me visiting 2 websites but one is going public real soon and I am a little afraid it will be even worse.

  • Jeff Grine 149 posts 189 karma points
    Oct 19, 2010 @ 21:23
    Jeff Grine
    0

    That actually makes sense. I do remember in the past setting the app pool to recycle in the middle of the night to avoid it randomly doing it during business hours. That might keep it from growing too large over the course of a couple of days. I've got some sites using quite a bit of memory as well, but I've just throttled down sql (same server) and bought more memory.

  • Pickels 75 posts 108 karma points
    Oct 19, 2010 @ 23:41
    Pickels
    0

    What kind of memory usage should I expect from an Umbraco site?

  • Jeff Grine 149 posts 189 karma points
    Oct 20, 2010 @ 14:51
    Jeff Grine
    0

    Really depends on the content. A quick survey this morning - one site with probably 5,000 nodes is using 650MB. Other sites with a couple hundred nodes are using anywhere from 50 to 250MB. Keep in mind that preview on the new version might load an entire new copy of the xml into memory depending on which node you preview.

  • Tom Benjamin 1 post 21 karma points
    Dec 03, 2010 @ 01:39
    Tom Benjamin
    0

    I've run into a very similar situation and wonder what the underlying problem and best solution is. We have just launched two new websites on a new Umbraco 4.5.2 instance, running on .NET 4 on a 64-bit Windows Server 2008 R2 platform, with 4 GB RAM and dual Xeon 3.16 GHz processors. Both sites are small, with only about 20 nodes each. But memory and CPU usage on the server is really high, and the sites are a little slow to respond. And on a machine that isn't running anything else - SQL server is on a different server - that just doesn't make sense.

    We initially added the new 4.5.2/.NET 4 Umbraco instance to the same web server that runs our first Umbraco 4.0.4/.NET 2 instance and another 9 websites. Website performance plummeted, so we took the 4.5.2 instance and moved it to a new server. To our astonishment the same problem is occurring. I could not figure it out at all, but after some sleuthing I installed the Microsoft ProcessExplorer - http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx - and it shows the w3wp.exe process with a "virtual size" of 2.8 GB. I've created a dedicated application pool for the Umbraco instance and set it to recycle once a day - during the middle of the night to avoid problems for users. The Windows Task Manger does not show the "virtual size", it shows "Memory (private working set)" at around 90 MB, which is less, but not that far off of what the ProcessExplorer shows for "Private Bytes" (134 MB) and "Working Set" (154 MB).

    Does anyone have any insights or solution to this problem?

Please Sign in or register to post replies

Write your reply to:

Draft