web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

SQL connection error in Sandbox environment

(0) ShareShare
ReportReport
Posted on by 485

Hello,

We started to experience problems with the connection to the dabase when running batches in Sandbox environment. Earlier, in onebox azure environment there wasn't such problems. The exact messages are:

"Cannot execute a stored procedure. There is a temporary problem with the connection to the database. Please retry later."

"Cannot select a  record in Dimension code combination, There is a temporary problem with the connection to the database. Please retry later."

And eventually this results to a failed batch task.

I have tried to google the problem, but couldn't find any other suggestion than "Try again later". It's not a good answer to our customer who expects more reliability from the system and it's been happening from time to time lately.

Thanks,

Migi

I have the same question (0)
  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi migi111,

    Do you run custom or standard operations in a batch? Is it related to a specific batch job or to all batch jobs? How long does it usually take to run it in batch?

  • migi111 Profile Picture
    485 on at

    It's been happening when running a customized feature in batch mode. When the batch run was restarted, it worked. But this has occured quite often lately.  

  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi migi111,

    How long usually does it take to finish custom job in batch? Do you have long open transaction during custom job processing? Which PU version are you using?

  • migi111 Profile Picture
    485 on at

    This time it took nearly 1,5 hours and we're running on PU 34.

  • Suggested answer
    Rahul Mohta Profile Picture
    21,032 on at

    check your SQL connection timeout settings

  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi migi111,

    Have you enabled the feature "Batch framework contention reduction"? If not, would you mind to try it?

    docs.microsoft.com/.../whats-new-platform-update-31

  • Sukrut Parab Profile Picture
    71,710 Moderator on at

    If its a custom batch job, are you connecting with some external DB  using store proc ?

  • Leo Chen Profile Picture
    on at

    If searching LCS telemetry with keyword like batch job id doesn't help to get more specific error info, would recommend you to raise a support request to get Microsoft support team engaged. 

  • Suggested answer
    Rahul Mohta Profile Picture
    21,032 on at

    also check the function the batch is doing

    if errors are accumulating due to dimension code validation then also it could take more time

    you could probably run in the dev box with trace and analyze for  contentions

  • migi111 Profile Picture
    485 on at

    Checked the parameter for connection timeout and it's timeout is set to 600 (default) - that's 10 minutes and I guess it should be enough.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 664 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 522 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 303 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans