Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Email Router - when updating Mailbox's email address returns SQL TIMEOUT ERROR.

Posted on by 10

Good afternoon,

I have a CRM 2016 OnPremise instance and I can't receive any incoming emails inside of it even though when I run the test access says everything is good.

First, I'm unable to change a queue record email address, because I keep receiving an SQL Timeout error (doesn't matter how much time you increase the timeout it will never change) but if I try to change any other field it works and saves (but not the email field of course).

The same with the Mailbox's records, when I try to change the email it returns a SQL Timeout error.

So what my smart butt did was changing these emails by SQL queries, but after that the emails still won't create inside CRM.

It shows the next warning log in the event viewer:

#35241 - The recipients for the email message with subject "[x]" in mailbox [email address] did not match any known records.

I'm running out of choices here, when I run the diagnosis tool on my organization it's performance is good but there must be something obstructing the communication with the SQL? Any clues? You could save my life :)

SQL TimeOut Error:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: SQL timeout expired.Detail: 
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
  <ErrorCode>-2147204783</ErrorCode>
  <ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic" />
  <Message>SQL timeout expired.</Message>
  <Timestamp>2018-10-10T14:14:15.5749939Z</Timestamp>
  <InnerFault i:nil="true" />
  <TraceText i:nil="true" />
</OrganizationServiceFault>

*This post is locked for comments

  • Suggested answer
    RE: Email Router - when updating Mailbox's email address returns SQL TIMEOUT ERROR.

    You can also try increasing the timeout by updating the timeout setting of the OLEDBTimeout key in the CRM registry node. 

    Steps for doing the same can be found in the link below. 

    I had a similar issue when trying to update the email address of a Queue record that I had setup in CRM 2016 and after restoring the database from another environment and trying to update the email address of the queue, I ran into the same issue. 

    Fix was to increase the timeout of the OLEDBTimeout in my case. 

    https://support.microsoft.com/en-us/help/918609/a-time-out-occurs-when-you-import-large-customization-files-into-micro

    https://community.dynamics.com/crm/b/crminthefield/posts/microsoft-dynamics-crm-timeout-settings

  • Verified answer
    Radu Chiribelea Profile Picture
    Radu Chiribelea 6,667 on at
    RE: Email Router - when updating Mailbox's email address returns SQL TIMEOUT ERROR.

    Hi Diego,

    It's not enough to change the email address in SQL in it's base table for a record, so that this can be used for email tracking. There are other references as well - for example the EmailSearchBase. This is why you need to let the platform handle your changes.

    You biggest issue here is the SQL Timeout and that is what you need to address. Since this occurs at a Create / Update I suspect there might be a deadlock somewhere. Do you have any plug-ins or workflows triggered at the time you create / update? If you disable those, do you still see the issue?

    Can you enable a CRM Platform trace at a Verbose Level while reproducing the issue? This would give you a better overview of the actual timeout and you can then start from there to tackle it. Feel free to share the traces in case you need any advice.

    Regards,

    Radu

  • Diego Romero Profile Picture
    Diego Romero 10 on at
    RE: Email Router - when updating Mailbox's email address returns SQL TIMEOUT ERROR.

    Anyone? :(

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans