Copied to clipboard

Flag this post as spam?

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


  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Oct 05, 2010 @ 10:10
    Jeroen Breuer
    0

    Umbraco website slow after app pool is recycled

    Hello,

    My Umbraco website is slow the first time a user visits the website after the app pool is recycled. This is because probably nothing is cached yet. I've used SQL Server Profiler to see what happens if a user visits a page for the first time after the app pool is recycled. Most queries are about loading the marco's which are on the website. After the user refreshed the page only my own queries where executed because the marco's are probably cached now. Is there a way to cache the macro's before the user visits the page for the first time? For example could I load them in a loose thread which I start on the application_start event (ApplicationBase in this case). This way all the macro's could be cached even the ones which aren't on the page the users visits.

    Is this possible and if so how can I cache macro's (and more if possible) in C#?

    Jeroen

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Oct 05, 2010 @ 10:20
    Dirk De Grave
    1

    how would you want to accomplish this? you'd have to check every page for a macro and cache the rendering of the macro? why not wait until a first page load for each macro to be cached? also, you'd have to rebuild the macro caches on each page publish as well as caches are invalidated after a page publish.

    Sounds like a lot of overhead for what umbraco does out of the box.

     

    Just my 0.02 cents.

     

    Cheers,

    /Dirk

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Oct 05, 2010 @ 10:24
    Jeroen Breuer
    0

    Ok that does sounds like a lot of work (hoped it would be easier). Currently the website is slow for the first visitor because nothing is cached. Just hoped there would be a way to make it fast even for the first user who visits the website.

    Jeroen

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Oct 05, 2010 @ 10:26
    Dirk De Grave
    0

    well, maybe you could add something similar as the ping.aspx service and have a "task" visit all of the pages after a app pool recycle, altho may be difficult to know when you're app pool will be recycled.

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Oct 05, 2010 @ 10:34
    Jeroen Breuer
    0

    I could try that :). The app pool recycle could be a bit difficult. Sounds like a nice idea for a package :).

    Jeroen

  • Shannon Deminick 1526 posts 5272 karma points MVP 3x
    Oct 05, 2010 @ 10:36
    Shannon Deminick
    2

    The website is slow for the first user for nearly all ASP.Net websites. This is due to the compilation that needs to occur in ASP.Net. Your DLL/ASPX files in your web app actually get compiled down further and run in memory. there's a ton of info on this on the net. Also make sure that you don't have compilation debug = true!

    http://aspnetresources.com/articles/debug_code_in_production

    http://weblogs.asp.net/scottgu/archive/2006/04/11/442448.aspx

    Yes, umbraco may not have things cached yet but I would assume that for the most part this 'slowness' is just how ASP.Net handles things. Precompilation could help:

    http://msdn.microsoft.com/en-us/library/bb398860.aspx

    And you can also try running your compilation in batch mode:

    http://geekswithblogs.net/shahed/archive/2006/11/16/97240.aspx

     

     

     

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Oct 05, 2010 @ 10:43
    Dirk De Grave
    0

    @Shannon: great set of resources, thanks for sharing, i'll bookmark them

  • Edwin van Koppen 156 posts 270 karma points
    Jan 10, 2013 @ 09:56
    Edwin van Koppen
    0

    I've got almost the same problem but my problem is mainly with the backend (there isn't much going on in frontend yet, it's a test or Umbraco is something for us).

    If i kill the w3wp.exe and startup the website is ok, if i go to Umbraco everything is fine also but then with the first publish it takes 214 seconds to publish (and w3swp.exe takes 50% cpu). It has to do something with the cache because the second publish is fast after that.

    All the backend events are disabled, i run Umbraco 7.11.1 with 3074 nodes, the Umbraco.config file is 1,467kb big.. hopefully somebody can help because this is a really major thing if we want to use Umbraco!

     

  • Edwin van Koppen 156 posts 270 karma points
    Jan 16, 2013 @ 16:48
    Edwin van Koppen
    0

    Anybody?

Please Sign in or register to post replies

Write your reply to:

Draft