Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

The operation has timed out errors when the Microsoft Dynamics CRM 4.0 E-mail Router runs Microsoft SQL Server queries provoking infinite loops alerts

$
0
0

Hello, we are having this issue since 3 days before; we will appreciate if you guys have some advice, recommendation of have resolved this before. 

The error that we got is:

->Delivering the e-mail message with subject "yada yada yada"

->An error occurred while delivering the e-mail message with subject "yada yada yada" in mailbox incoming@mail.com for delivery to http://server/deployment/. System.Net.WebException: The operation has timed out   at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)    at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)    at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)    at Microsoft.Crm.Sdk.Proxy.CrmService.Execute(Request Request)    at Microsoft.Crm.Tools.Email.Providers.CrmPollingMailboxProvider.DeliverMessageInternal(EmailMessage emailMessage)    at Microsoft.Crm.Tools.Email.Providers.Pop3PollingMailboxProvider.DeliverMessageInternal(EmailMessage emailMessage)    at Microsoft.Crm.Tools.Email.Providers.CrmPollingMailboxProvider.DeliverMessage(EmailMessage emailMessage)    at Microsoft.Crm.Tools.Email.Providers.CrmPollingMailboxProvider.Run()

Reviewing the query that the email router executes and provoke the error, it is:

->WITH Candidates(ActivityId) AS   (SELECT ActivityId FROM EmailHashBase     WHERE ActivityId IN     (SELECT ActivityId FROM EmailHashBase WHERE HashType = 1 AND Hash IN (98430130,1634163028)    GROUP BY ActivityId HAVING COUNT(ActivityId) >= 2)    AND HashType = 0 AND Hash IN (123242,3667292,-1587173179,3939,119248831,-1601819342,-1384192387,114855,309621743,1465768208,45,-639406244)     GROUP BY ActivityId HAVING COUNT(ActivityId) >= 12)  SELECT TOP 1 e.ActivityId FROM EmailBase AS e  JOIN ActivityPointerBase AS a ON (e.ActivityId = a.ActivityId)  WHERE a.DeletionStateCode = 0 AND e.ActivityId IN   (SELECT ActivityId FROM Candidates as c WHERE    ((SELECT COUNT(*) FROM EmailHashBase AS h WHERE h.ActivityId = c.ActivityId AND h.HashType = 0) <= 12)  )  ORDER BY a.ModifiedOn DESC OPTION (FORCE ORDER)

The EmailHashBase table has around 19000000 records (about 8 GB size). We have applied the recomendations in the http://support.microsoft.com/kb/2403296/en-us post, but it is still the same.

Do you people know what does the "EmailHashBase" table stores? and is it safe to truncate that table? or at least delete the records related to email activities older than 2 years? so the query before can be well executed by the E-mail Router.

Thanks in advance for your help and advice.

Cordially,

Armando.

 

 


Viewing all articles
Browse latest Browse all 82002

Trending Articles