AnsweredAssumed Answered

Slow loading forms and Nintex ULS errors

Question asked by keegan on Mar 3, 2015
Latest reply on Mar 30, 2017 by jagadishnpy@gmail.com

We have an issue where by loading up relatively basic Nintex forms regularly takes up to 20 seconds which is unacceptable. Upon investigating the issue it can be see that Unexpected Exceptions are being raised in ULS whenever the form is opened (no matter how) and I want to resolve these exceptions as it may be affecting performance.

 

Full Stack from ULS

Detected use of SPRequest for previously closed SPWeb object.  Please close SPWeb objects when you are done with all objects obtained from them, but not before.  Stack trace:  

at Microsoft.SharePoint.SPListCollection.ItemByInternalName(String strInternalName, Boolean bThrowException)   

at Microsoft.SharePoint.SPListCollection.GetList(Guid uniqueId, Boolean fetchMetadata)   

at Nintex.Workflow.NWListWorkflowContext.get_WorkflowInstance()   

at Nintex.Workflow.HumanApproval.ApprovalContextUtil.AddApprovalContextData(NWContextDataCollection data, Approver approver, NWWorkflowContext parentContext, ContextDataOptions options, Boolean taskitemDependentOnly)   

at Nintex.Workflow.HumanApproval.ListWorkflowApprovalContext.GetContextData(Approver appover, ContextDataOptions options, Boolean forceRefresh, Boolean retrieveForLogging)   

at Nintex.Forms.SharePoint.NintexWorkflowMethods.AddContextData(SPWeb web, Guid list, SPListItem listItem, ContextDataCollection formsContextData, Collection`1 variables, PublishingType publishingType, Nullable`1 instanceId, Approver approver, ContextKeyCollection keysUsed, ContextDataOptions contextDataOptions)   

at Nintex.Forms.SharePoint.NintexWorkflowMethods.FormPreProcessorGetContextData(SPWeb web, Guid list, SPListItem listItem, String serializedForm, Collection`1 variables, PublishingType publishingType, SPControlMode formMode, Nullable`1 instanceId, Approver approver)   

at Nintex.Forms.SharePoint.NintexWorkflowMethods.FormPreprocessor(SPWeb web, Guid list, SPListItem listItem, String serializedForm, Collection`1 variables, PublishingType publishingType, SPControlMode formMode, Nullable`1 versionNo, Nullable`1 instanceId, Approver approver)   

at Nintex.Forms.SharePoint.TaskHelper.FormPreprocessor(SPListItem task, SPListItem listItem, String serializedForm, Collection`1 workflowVariables, Approver approver, HttpRequest request, SPControlMode sharePointControlMode)   

at Nintex.Workflow.Forms.ControlTemplates.TaskForm.GetForm(String formKey, FormData formData)   

at Nintex.Workflow.Forms.ControlTemplates.TaskForm.ConfigureFiller()   

at Nintex.Workflow.Forms.ControlTemplates.TaskForm.InitialiseForm()   

at Nintex.Workflow.Forms.ControlTemplates.TaskForm.OnInit(EventArgs e)   

at System.Web.UI.Control.InitRecursive(Control namingContainer)   

at System.Web.UI.Control.InitRecursive(Control namingContainer)   

at System.Web.UI.Control.AddedControl(Control control, Int32 index)   

at Microsoft.SharePoint.WebPartPages.ListFormWebPart.CreateChildControls()   

at System.Web.UI.Control.EnsureChildControls()   

at Microsoft.SharePoint.WebPartPages.WebPart.get_WebPartMenu()   

at Microsoft.SharePoint.WebPartPages.ListFormWebPart.CreateWebPartMenu()   

at System.Web.UI.Control.OnLoad(EventArgs e)   

at Microsoft.SharePoint.WebPartPages.ListFormWebPart.OnLoad(EventArgs e)   

at System.Web.UI.Control.LoadRecursive()   

at System.Web.UI.Control.LoadRecursive()   

at System.Web.UI.Control.LoadRecursive()   

at System.Web.UI.Control.LoadRecursive()   

at System.Web.UI.Control.LoadRecursive()   

at System.Web.UI.Control.LoadRecursive()   

at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)   

at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)   

at System.Web.UI.Page.ProcessRequest()   

at System.Web.UI.Page.ProcessRequest(HttpContext context)   

at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()   

at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)   

at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)   

at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)   

at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)   

at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)   

at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)   

at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)   

at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)

 

Nintex.Workflow.NWListWorkflowContext.WorkflowInstance (returning SPWorkflow) snippet

public override SPWorkflow get_WorkflowInstance()

{

    if (base._instanceID == Guid.Empty)

    {

        return null;

    }

    if (base.spWorkflow == null)

    {

        SPList list = base._web.Lists.GetList(base.listId, true);

        ....

    }

    return base.spWorkflow;

}

 

It would appear when this is called the web on the base has been disposed and so the error is thrown.

 

Can you please investigate this issue ?

 

Many thanks,

Keegan Rowe

Outcomes