Pages

Friday, February 24, 2012

Slow CMS Due to .NET Preexecution

If active scripting in project is configured to aspx, then a cache dll is created on the server's "Temporary ASP.NET files" folder for every SmartEdit page access, page preview and page publish.  Management Server slows down as more cache dlls are created within "Temporary ASP.NET files", eventually Management Server becomes unresponsive when accessed via SmartEdit, page preview or publishing.

The solution to delete the amounting cache dlls via an automated task, preferably nightly, schedule it so it does not clash with publishing or user access time period.

7.x to 9.x SP1 (using .NET 1.1)
Create "Clear_.NET_Temp_Cache.bat" in [MS Installation Directory]\ASP\Plugins
c:
cd "C:\Windows\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\cms"
del /S /Q *

9.x SP2 to 10.x (using .NET 3.5)
Create "Clear_.NET_Temp_Cache.bat" in [MS Installation Directory]\ASP\Plugins
c:
cd "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\cms"
del /S /Q *

Create User-defined Job
Create user-defined job that runs nightly, schedule it so it does not conflict with existing publishing time.

Configure user-defined job to "External application", and provide path to aforementioned .bat file


For Management Server Clusters
N user-defined jobs for N Management Servers in the cluster

7 comments:

  1. Hi Jian,

    Am i right to assume this would still be an issue for v11?

    - Morgan

    ReplyDelete
    Replies
    1. Hi Morgan,

      I believe so due to how page builder operates, generating unique URL based on access time. .NET treats unique URL as unique page and creates different cache .dll each time.

      Delete
    2. Hi,

      for V11 current HF the timestamps used in URLs are eleminated. Therefore the amount of temp-files might be a bit smaller...

      Delete
  2. Great idea, I have a scheduled task which clears out all the rdexecute and preexecute files from my folders (on my dev machine as we run with the 1280 flag fo debugging etc). Its just in a windows sched task at the moment but I think Im going to change it to a reddot task and add in this as well just to be extra tidy.

    ReplyDelete
  3. Hi Jian,

    I try this on my V11-development enviroment with this batch file content:
    cd "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\cms"
    del /S /Q *

    because the ApplikationPool for Preexecute was set to V4 of the .Net Framework. Now I get the error cannot not read redirect.config in my iis manager and the cms is not working anymore.

    ReplyDelete
    Replies
    1. Strange... it looks like that the content of the C:\Windows\System32\inetsrv\config dir where deleted instead.

      Delete
    2. Hi,

      I can't seem to be able to replicate the issue on my v11 environment

      -Jian

      Delete