5

I am running sharepoint server 2010 with 8GB RAM. I have a SP Designer Workflow running on my portal. The server used to respond but now when users try to hit the URL they get an error message. I checked on my server only to realise that the OWStimer.exe takes much memory which explains why users get request time out error. I restarted the server but after 2-4 hrs its start running very slow and memory usages goes to 95%(7.95 GB). OWSTIMER.exe takes 6.6GB.

I read many articles and they think this might be happening due to the fact that I have a workflow running but the reality is that I also need that workflow for my document approval.

Your assistance will be much appreciated.

5
  • 1
    Is it a custom workflow using VS2010? Do you have custom timer jobs? Commented Nov 14, 2011 at 13:13
  • Hi David, I have a custom action for SharePoint Designer. I developed it using VS2010. Do you have any idea what might be the issue?
    – Sepaka
    Commented Nov 15, 2011 at 6:06
  • Are you disposing your SPSite/SPWeb objects in code? The timer service actually runs the workflows, and if you have some leaky code, it'll flood your basement. Commented Nov 15, 2011 at 12:03
  • Not disposing it to code
    – Sepaka
    Commented Nov 16, 2011 at 8:12
  • ? are you instantiating new SPSite or SPWeb objects? Commented Nov 16, 2011 at 12:53

3 Answers 3

1

I have encountered this issue twice and both times it was workflow related. Completely deleting and then recreating the workflows solved the issue both times.

There is an issue that we documented with Microsoft where, under certain conditions, a workflow would duplicate some nodes in its XML thousands of times, resulting in a single workflow that was over 250MB in size, which then had to be parsed and processed every time the workflow loaded, resulting in massive memory consumption and high CPU usage. These appeared to be very simple workflows that did nothing that unusual.

Unfortunately, we were never able to determine exactly what the conditions were that causes this to happen.

1
  • How were you able to determine when the XML duplication was happening? Commented Sep 7, 2015 at 15:20
1

Make sure you've installed KB946517. OWSTIMER used to cause major memory leaks. We had a consultant recommend we set up a daily job to restart the timer service because of known memory leak issues. Apparently, this hotfix addresses this issue.

2
  • Thanks Ronx. Does this apply to SharePoint 2010 or is it only for wss?
    – Sepaka
    Commented Nov 28, 2011 at 7:12
  • According to Todd Carter, only MOSS 2007 & WSS 3.0 are affected. The hotfix is for Server 2008, though, so it might be worth reviewing/applying just to make sure the root cause is eliminated.
    – ronx
    Commented Dec 14, 2011 at 2:18
0

I had the same problem the timer service going to 99% cause of the workflow timer job.

I ran this script:

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") > $null 
$outputFile = Read-Host "Filename and location (i.e. E:\Script\output.txt)"

$farm = [Microsoft.SharePoint.Administration.SPFarm]::local
$websvcs = $farm.Services | where -FilterScript {$_.GetType() -eq [Microsoft.SharePoint.Administration.SPWebService]} 
$webapps = @() 

$outputHeader = "Url;List;Workflow;Running Instances" > $outputFile

foreach ($websvc in $websvcs) { 
  foreach ($webapp in $websvc.WebApplications) { 
    foreach ($site in $webapp.Sites) {
      foreach ($web in $site.AllWebs) {
        foreach ($List in $web.Lists) {
          foreach ($workflow in $List.WorkflowAssociations) {
            $output = $web.Url + ";" + $List.Title + ";" + $workflow.Name + ";" + $workflow.RunningInstances
            Write-Output $output >> $outputFile
          }
        }
      } 
    } 
  }
}
$Web.Dispose();
$site.Dispose();

It will write to a txt file:

Url;List;Workflow;Running Instances http:site;AZ Released;AZ Document Categorize;50

I then could cancel and rewrite the workflow better.

Hope that helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.