Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Multiple (over 150 ESTABLISHED) CrmAsynService connections to the database server

(0) ShareShare
ReportReport
Posted on by 417

How many "CrmAsyncService.exe" connections to the CRM Database-Server (on-premise) are normal? Our server has 150+ ESTABLISHED connections to the database server:

multiple-crmasycnservice-conntions.png

I already checked our plugin code for open SqlConnections but all are IDisposable (used with using).

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Multiple (over 150 ESTABLISHED) CrmAsynService connections to the database server

    The new plugins are using web services  but there is some legacy code dll , that got migrated from old crm, However if you have many plugins or workflows triggered and which are set to run asynchronously.

  • Radu Chiribelea Profile Picture
    Radu Chiribelea 6,667 on at
    RE: Multiple (over 150 ESTABLISHED) CrmAsynService connections to the database server

    Hi Bernhard,

    As mentioned above - the Async Service handles other asynchronous tasks besides Server Side Synchronization for emails, appointments and tasks. For a full list you can check docs.microsoft.com/.../asyncoperation under OperationType.

    Regarding the traces, you can use the trace parser tool and filter them based on Platform.Sql events - there you could see the generated queries and narrow down to a specific plugin.

    However if you have many plugins or workflows triggered and which are set to run asynchronously + server side synchronization i don't think you should have any issues - unless the connections to the SQL DB were started outside the CRM WebService context.

    Regards,

    Radu

  • Suggested answer
    Kokulan Profile Picture
    Kokulan 18,050 on at
    RE: Multiple (over 150 ESTABLISHED) CrmAsynService connections to the database server

    I think it could be that you have loads of workflows or system jobs running in async. Its perfectly normal for CrmAsyncService to execute loads of concurrent sql queries.  The fact that the Process ID is  same, not much to worry about in my view.

    Check the System Jobs or Process Sessions to see if there jobs running

    If you do want to check log files, its hard to go through the file as it logs a lot, you can use the trace reader

    www.xrmtoolbox.com/.../MscrmTools.CrmTraceReader

  • bernhards Profile Picture
    bernhards 417 on at
    RE: Multiple (over 150 ESTABLISHED) CrmAsynService connections to the database server

    Hi Radu, ^^

    Ok, I just turned it on for a short time and now I have a bunch of files. But for what keyword could I search? (I tried the server db IP, the hostname and sql.)

    All of the new plugins are using the web service but there is some legacy code dll that got migrated from the old crm 2011 system and it can be used by some old plugins. Since I am only one crm guy I had no time to investigate it. It can be that some of this old code opens a db connection and did not close it after that.

    What confuses me it that I thought the async service would only handle the email synchronisation?

    Something else is that we are still using Exchange 2010 Sp2...

    Thanks,

    Bernhard

  • Suggested answer
    Radu Chiribelea Profile Picture
    Radu Chiribelea 6,667 on at
    RE: Multiple (over 150 ESTABLISHED) CrmAsynService connections to the database server

    Hello,

    I would personally collect a CRM Platform trace at a Verbose level and have a look at the call stack and see where this roots.

    Are you accessing the CRM DB directly from the Plug-in? Why not get the data via the CRM Web Service?

    Regards,

    Radu

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,735 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,466 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans