Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workflow Sync can result in OutOfMemory Exception #75

Open
mlRosenquist opened this issue Dec 21, 2023 · 2 comments · May be fixed by #77
Open

Workflow Sync can result in OutOfMemory Exception #75

mlRosenquist opened this issue Dec 21, 2023 · 2 comments · May be fixed by #77
Assignees

Comments

@mlRosenquist
Copy link

Describe the bug
When performing workflow sync towards an environment it can result in OutOfMemory Exception.

After doing a bit of digging in DAXXIF, i am pretty sure i found the root. DAXXIF will hold the pluginassembly record in memory with a full columnset (quite large for an pluginassembly) x amount of times. x is here the amount of solutions which refer a given workflow version and dll name.

To Reproduce
Steps to reproduce the behavior:

  1. Reference the an assembly "enough times" (ours was 30)
  2. Run the WorkFlowSync

Expected behavior
The workflow sync should succeed no matter the amount of references it has to solutions.

Fix is most likely to add an condition to the LinkCriteria. /Common/CrmDataInternal ~ line 529-536.

Screenshots
Local replication:
oom-workflowSync

Environment

  • CRM/D365/CDS version: 9.2.23112.00216
  • Tool version: 5.3.1
@bo-stig-christensen bo-stig-christensen self-assigned this Apr 29, 2024
@bo-stig-christensen
Copy link
Member

bo-stig-christensen commented Apr 29, 2024

Looking into this one.
It seems to happen in environments with a lot of processes (workflows, BPFs, etc.).
This may happen if multiple D365 Apps such as Sales, Customer Service, Field Service, and Marketing arer all installed as well as having multiple custom processes. This makes the list of processes quite extensive and may therefore result in an OutOfMemoryException.

My initial thesis is also (as you mentioned) that the queries related to map out the processes seem to be using more information and therefore more memory than is actually needed.
I'll optimize the queries and test it out.

@bo-stig-christensen
Copy link
Member

I optimized multiple queries and tested it on a live project having similar issues.
Looking good.
Performance of WorkflowSync has improved a factor 3, and large plugin assemblies are no longer an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants