Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

CRM 2016 Async plugins firing inconsisentely

(0) ShareShare
ReportReport
Posted on by
I have an entity with 4 plugins registered on the update message.
Two of the plugins are registered on the pre-operation pipeline stage and two of the plugins are registered asynchronously on the post-operation pipeline stage.  All four plugins have different filtering attributes.
Each of the plugins serializes its context to an xml file as soon as the Execute method is entered.  This is functionality baked into a base class we have and I have no reason to believe this would fail.
When testing the same record for an update I get inconsistent results.
Sometimes only the pre-operation pipeline plugins fire and sometimes all four plugins fire.
What is odd, is that I can tell by the value of the record I'm testing on, that all four plugins have fired.  However in many cases the serialized context file isn't generated   
I've experimented with changing both of the async plugins to synchronous and that seems to temporarily fix the issue.  I've also experimented with disabling the pre-op plugins and only letting the async fire.
Has anyone dealt with a similar issue?

*This post is locked for comments

  • Suggested answer
    Dynamics_Alok Profile Picture
    Dynamics_Alok 1,746 on at
    RE: CRM 2016 Async plugins firing inconsisentely

    Execution Order of Async Plugin does not work on any statistical way.It depends on many factors like free System Resources ,AppDomain  and many others including CRM services and records.

  • Suggested answer
    ScottDurow Profile Picture
    ScottDurow 19 on at
    RE: CRM 2016 Async plugins firing inconsisentely

    Hi - this is expected behaviour for async plugins since the execution order is not guaranteed to be the same as when the event fired. This is due to the parallel nature of the async servers.

    Sync plugins will however always fire in the same sequence they are triggered.

    Hope this helps

  • Suggested answer
    Zohaib Uddin Khan Profile Picture
    Zohaib Uddin Khan 2,811 on at
    RE: CRM 2016 Async plugins firing inconsisentely

    Seems like Asynchronous Service has some problem. Asynchronous Service is either installed on your CRM Web server or separate server.

    Stop and Re-start the Asynchronous Service.

    1.Go to CRM Web server.

    2.Navigate to Start, select Administrative Tools, then click Services.

    3.Go through the list and find Microsoft Dynamics CRM Asynchronous Processing Service. If you're unable to find on the CRM Web Server, then check your topology diagram and verify on every server in your topology.

    4.Right-click Microsoft Dynamics CRM Asynchronous Processing Service in the Name column of the service listing.

    5.Click Start or Stop. Or, you can click Properties in the shortcut menu and then click Start or Stop in the dialog box.

    You must have System Administrator privileges to stop or start the service.

    Apart from this try Plugin Profiler to check the behaviour.

  • Suggested answer
    Drew Poggemann Profile Picture
    Drew Poggemann 4 on at
    RE: CRM 2016 Async plugins firing inconsisentely

    Did you try restarting the Async service to see if resolves? Do you have multiple and one was restarted and the other wasn't?

    Hope this helps

    Thanks,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,430 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans