We have a SharePoint Site collection with a single root site having a few list and minimum data. About 10 lists and 10 15 records in each list. We have a single Nintex workflow for approvals. The approval has few stages and it uses if conditions, flexi tasks and send email notification for most of its controls. there are about 50 to 60 controls used in the workflow in total.The export size of the workflow is about 2 MB. We have cleared up the logs and tasks. we have also deleted the previous versions of the workflow. The issue we are facing is that this single workflow is occupying 210MB (analysis from /layouts/storman.aspx) of memory space out of the limited memory space that we have.
Kindly suggest ways to reduce the memory usage of Nintex workflow in SharePoint site.
That is quite incredible that a 2MB exported workflow contains 210 MB of diskspace. I've found several times that Storage Metrics is close, but not always exact. To find a better calculation:
When you publish a workflow it associates a XOML file (WWF3) to the list. It's just an XML file and text, so it shouldn't be 210MB.
But, to limit the size of a workflow I would first break up the 2MB workflow. Try to create workflows at 1MB or smaller when exported. The smaller the easier to cache. For 2013 the documented XAML size to publish is 5MB, so you should be just fine.
Did you consider the performance recommendation provided by Nintex. If not please find the link to the document. Consider splitting the workflow into logical child workflows. Its recommended that workflow size should be around 500KB.
I have used several optimization techniques but were still facing the issue.
Finally we found out that the version history was the root cause of the issue. Nintex has hidden library "NintexWorkflows" were it stores xoml, rules and config file in addition to the default SharePoint workflow location. It creates new version each time we publish the workflow in both these locations. Removing old versions or disabling versioning did not help as the setting were restored after we republished the workflow. We had to export a copy (.nwf) of the workflow. Then remove the workflow from the workflow setting (ensure no instance is in progress) and create a new workflow from the export file.
Now the entire site collection storage with other lists and data is just 10 MB.
Thank you so much for providing that insight!
If you don't mind me asking, I'm curious to how many versions where there for the single workflow? Just wondering how 1 for 1 it is per version.