locked
Emails sending very slowly from specific account RRS feed

  • Question

  • Hello,

    We have several emails that are sent automatically (both plugin and workflow) to communicate about support requests from our customer. These emails are sent from our admin account (which happens to also be the account who's mailbox is setup for the router). This account occassionally (though more often recently) sends email at an incredibly slow rate and we end up with emials from hours ago sitting in 'Pending Send'.

    We installed rollup 13 in early October (not on 14 yet). We are also receiving these errors in the event log on the server hosting the router (which also happens to be one of the application servers).

    #61346 - An error occurred while checking for outgoing e-mail messages to process for SMTP: http://server/org. System.Threading.ThreadAbortException: Thread was being aborted.

       at System.Array.Clear(Array array, Int32 index, Int32 length)

       at System.Collections.ArrayList.Clear()

       at System.Collections.CollectionBase.Clear()

       at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)

       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.CrmPollingSendEmailProvider.RequestEmailsToProcess(QueryExpression query)

       at Microsoft.Crm.Tools.Email.Providers.CrmPollingSendEmailProvider.RetrieveNextMessageInternal()

       at Microsoft.Crm.Tools.Email.Providers.CrmPollingSendEmailProvider.RetrieveNextMessage()

       at Microsoft.Crm.Tools.Email.Providers.CrmPollingSendEmailProvider.Run()

       at System.Array.Clear(Array array, Int32 index, Int32 length)

       at System.Collections.ArrayList.Clear()

       at System.Collections.CollectionBase.Clear()

       at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)

       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.CrmPollingSendEmailProvider.RequestEmailsToProcess(QueryExpression query)

       at Microsoft.Crm.Tools.Email.Providers.CrmPollingSendEmailProvider.RetrieveNextMessageInternal()

       at Microsoft.Crm.Tools.Email.Providers.CrmPollingSendEmailProvider.RetrieveNextMessage()

       at Microsoft.Crm.Tools.Email.Providers.CrmPollingSendEmailProvider.Run()

     

    #26234 - The E-mail Router service could not process a provider work item using assembly: Microsoft.Crm.Tools.EmailProviders.dll and class: Microsoft.Crm.Tools.Email.Providers.SmtpPollingSendEmailProvider. System.Threading.ThreadAbortException: Thread was being aborted.

       at Microsoft.Crm.Tools.Email.Providers.CrmPollingSendEmailProvider.Run()

       at Microsoft.Crm.Tools.Email.Agent.ServiceCore.ExecuteProviderWork(Object providerQueueRequestObject)

     

    #14494 - A provider work item using assembly: Microsoft.Crm.Tools.EmailProviders.dll and class: Microsoft.Crm.Tools.Email.Providers.SmtpPollingSendEmailProvider has been aborted because it has been running for longer than the allowed execution time. This behavior may occur when there is a problem with the network or because the e-mail server is busy. Verify that you can log on to the e-mail server by using an e-mail application that uses the account specified for the E-mail Router.

    #61346 - An error occurred while checking for outgoing e-mail messages to process for SMTP: http://server/org. System.Web.Services.Protocols.SoapException: Server was unable to process request.

       at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)

       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.CrmPollingSendEmailProvider.RequestEmailsToProcess(QueryExpression query)

       at Microsoft.Crm.Tools.Email.Providers.CrmPollingSendEmailProvider.RetrieveNextMessageInternal()

       at Microsoft.Crm.Tools.Email.Providers.CrmPollingSendEmailProvider.RetrieveNextMessage()

       at Microsoft.Crm.Tools.Email.Providers.CrmPollingSendEmailProvider.Run()\r\n

      0x80044150

      Generic SQL error.

      Platform

     

     

    We have verified that we can log into the mailbox and items that are not sent from the account mentioned above seem to be sending fine. Testing access in the router configuration tool returns success for both incoming and outgoing profiles. We have also restarted everything (including the email service and the server itself) without success.

     

    We have attempted the steps documented here:

     

    http://blogs.msdn.com/b/benlec/archive/2009/09/30/microsoft-dynamics-crm-4-0-e-mail-router-unexpectedly-stalls.aspx

     

    As well as here:

     

    http://social.microsoft.com/Forums/en-US/crm/thread/2ba11411-19d4-40ef-af7d-dddd9b66a363/

     

    So far we have not had any success. Emails are sending out at about 5 emails every 10 minutes which is not enough to keep up. Note that for the most part this account has been sending email successfully for several months via these workflows and plugins (which have not been modified recently). Any help that can be provided would be most appreciated!

     

    Thanks in Advance!

     

    -Dustin

     

    Monday, January 3, 2011 7:21 PM

All replies

  • Hi Dustin,

    Update Rollup 14 and Related Email router. These steps can be solution for you.

    Regards,

    Tuesday, January 4, 2011 9:18 PM
  • We got rollup 14 installed and everything ran fine for a couple weeks and now the problem is reoccuring.

    The problem is not quite as extreme as it was but it is still not keeping up (looks like 5 emails every 2 minutes).

    We now have customers getting emials several hours after they should have gotten them which is a problem with our business.

    We moved the router to a different server. I ran a crm trace and packet trace. It doesnt look like exchange is the problem as CRM is only trying to send emails once every 5 minutes or so and the CRM trace was clean/no exceptions.

    Thinking it may be SQL our DBA did some profiling for us and the longest query is against the emailhash table but is running in typically running in mili-seconds (longest was 2 seconds).

    So there must be something with our router configuration or something at an application level that is keeping this user bound up to 5 emails every couple of minutes.

    We have a ticket open with Microsoft but it seems to be going nowhere..reaching out where I can.

    ANY help is appreciated.


    Thanks again,


    Dustin 

    Tuesday, January 25, 2011 12:04 AM
  • Have you looked at the settings files for the email router, Default path "C:\Program Files\Microsoft CRM Email\Service\Microsoft.Crm.Tools.EmailAgent.xml"

    Reduce the scheduling period and increase threads etc, see if that does something for you.

        <MaxThreads>50</MaxThreads>
        <MaxThreadExecution>600000</MaxThreadExecution>
        <SchedulingPeriod>30</SchedulingPeriod>
        <ConfigRefreshPeriod>5000</ConfigRefreshPeriod>
        <ConfigUpdatePeriod>3600000</ConfigUpdatePeriod>
        <LogLevel>1</LogLevel>

     


    Halldór Jóhannsson
    Wednesday, January 26, 2011 11:38 AM