Try our conversational search powered by Generative AI!

Very slow when saving page



When a user is saving a page after som changes has been done the save process takes up to 2 minutes. Otherwise the site is working more or less fine when it comes to preformance.

Can anyone please help on this topic. Where can I start look for any solution for this issue.

I am using CMS 5.

 Thanx in advance.



May 20, 2008 10:23
Have you attached any events to savepage?
May 20, 2008 10:46

Hi Adnan!

Do you see the CPU % go up during these 2 minutes?

If CPU is low, then theres probably some locks blocking the thread, and if its high the most likely cause would be some massive code executing,

In either way, this would be a perfect challenge for using the Debugging tools for Windows to grab a dump of the workerprocess during this period and then inspect using WinDBG + SOS.dll. More on this on Tess Fernandez most excellent blog:

One quite common pitfall is hooking the DataFactory SavePage event to an Page/WebControl-*instance* method, in which case the event would never be released but will stay around forever making performance degrading over time.

An example of such inappropriate code would be:

public class MyPage : Page
  protected override void OnInit( EventArgs ea )
    EPiServer.DataFactory.Instance.SavedPage += new PageEventHandler( PageSaved);

  protected void PageSaved(object sender, PageEventArgs ea)

The solution in this case would be to a) make the eventhandler PageSaved static and b) checking that the event hasnt already been hooked before hooking.


May 20, 2008 11:31


 Yes there is an event attached to the savepage.

I just wrote som code to log the time used in the savepage event.

I dont know the outcome yet, but thanx for the tip so far!


May 20, 2008 11:35

Hi Adnan

I'd suggest that you enable EPiServers logging on DEBUG level, and try to "capture" one save event. That should give some more clues as to what is actually happening that is taking so long time.

Read to FAQ below on how to log in EPiServer:

Per Gunsarfs
EPiServer Development Team

May 20, 2008 11:42


After some logging I found out that the event on pagesave was executing several times when clicked once on "Save". I solved it by adding a check before I attach the event to the pagesave in the base class.

Most likely this was causing the save issues on the live server. If not I will let you know.

Thank u all for the help!!!



May 20, 2008 13:19
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.