Personalized Community is here!
Quickly customize your community to find the content you seek.
Have questions on moving to the cloud? Visit the Dynamics 365 Migration Community today! Microsoft’s extensive network of Dynamics AX and Dynamics CRM experts can help.
2021 Release Wave 1Discover the latest updates and new features to Dynamics 365 planned April 2021 through September 2021.
Release overview guides and videos Release Plan | Preview 2021 Release Wave 1 Timeline
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
CRM Email Router performance issues have been noticed after the install of SERVICE PACK 1.
We have noticed a lot of deadlock occuring mainly because of 2 types of queries triggered by EMAIL router.
update [ActivityPointerBase] set [PostAuthorYomiName]=@PostAuthorYomiName0 where ([PostAuthor] = @PostAuthor0 and [PostAuthorType] = @PostAuthorType0)
This update occures a lot and is trying to update values in ActivityPointerBase.
ActivityPointerBase has approx. 4 mio rows.
The "FUNNY" thing is, that there is no data in PostAuthor and PostAuthorType fields so update never really occurs, but it has to lock the whole table.
exec sp_executesql N'select
top 5 "email0".Subject as "subject"
, "email0".Description as "description"
, "email0".PriorityCode as "prioritycode"
, "email0".ActivityId as "activityid"
, "email0".ModifiedOn as "modifiedon"
, "email0".StateCode as "statecode"
, "email0".StatusCode as "statuscode"
, "email0".DeliveryAttempts as "deliveryattempts"
, "email0".AttachmentCount as "attachmentcount"
, N'''' as "safedescription"
Email as "email0" (NOLOCK) join ActivityParty as "activityparty1" (NOLOCK) on ("email0".ActivityId = "activityparty1".ActivityId and (((("activityparty1".ParticipationTypeMask = @ParticipationTypeMask0 and ("activityparty1".PartyId in (@PartyId0
(("email0".StateCode = @StateCode0 and ("email0".StatusCode != @StatusCode0 or "email0".StatusCode is null) and "email0".DirectionCode = @DirectionCode0 and (((((("email0".DeliveryAttempts = @DeliveryAttempts0)))))))) order by
"email0".ActualEnd asc',N'@StateCode0 int,@StatusCode0 int,@DirectionCode0 bit,@DeliveryAttempts0 int,@ParticipationTypeMask0 int,@PartyId0 uniqueidentifier,@PartyId1 uniqueidentifier,@PartyId2 uniqueidentifier,@PartyId3 uniqueidentifier,@PartyId4 uniqueidentifier',@StateCode0=1,@StatusCode0=3,@DirectionCode0=1,@DeliveryAttempts0=0,@ParticipationTypeMask0=1,@PartyId0='4902A80D-D304-DE11-91C3-005056A25867',@PartyId1='75A7A213-D304-DE11-91C3-005056A25867',@PartyId2='91A7A213-D304-DE11-91C3-005056A25867',@PartyId3='98A7A213-D304-DE11-91C3-005056A25867',@PartyId4='9FA7A213-D304-DE11-91C3-005056A25867'
This query also occurs very frequently and is causing about 5mio logical reads per execution.
Is there any way to re-configure the CRM EMAIL router to stop the performance issues and deadlocks or should we create sql indexes that would somewhat remedy this situation?
I think looking at the indexes would be a good start as it wont take you too long to do either. Let us know how this works out for you!
Have you noticed any error or warning on Email Router server ?
Email router is installed on CRM/ADFS Server or its installed on separate server ?
You can also run query 2 in Database tune advisor, if you seeing it very frequently in event logs and check the recommendations generated.
You can also below blogs to enhance the performance of Email Router
I've setup 2 suggested indexes (by Tuning Advisor - Execution plan) on ActivityPointerBase table and this seemed to help.
The 2. query I've mentioned is not locking the database, but is very frequent and in-performant so I am looking to setup up an index for that too.
Thank you for your suggestions!
Business Applications communities