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

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Axios POST api call is returning timeout error.

(2) ShareShare
ReportReport
Posted on by 6
We are using an axios call for POST /api/data/v9.2/contacts - Contact creation api. This api is returning the following error. 

"error":"Error: timeout of 10000ms exceeded\n at createError

It appears that the API is taking too long to respond, exceeding the 10000ms.

Could anyone help us understand why this API might be responding slowly?

And is there any way to eliminate this. 
Categories:
I have the same question (0)
  • Suggested answer
    Amit Katariya007 Profile Picture
    10,409 Super User 2025 Season 2 on at
    Axios POST api call is returning timeout error.
    The "timeout of 10000ms exceeded" error in your Axios call suggests that the Dynamics 365 API endpoint is taking longer than 10 seconds (10,000 ms) to respond. Here are some reasons for this delay, along with suggestions on how to handle it:
     
    Possible Reasons for Slow Response
     
    1. Network Latency: There might be network delays between your application and the Dynamics 365 server, especially if they are in different regions or experiencing high traffic.
     
    2. Server Load: The Dynamics 365 server could be under high load, affecting response times, particularly during peak usage or maintenance.
     
    3. Complex Processes Triggered on Contact Creation: When a new contact is created, plugins, workflows, or Power Automate flows may trigger in Dynamics 365, potentially slowing down the response. Check if any custom processes are running on contact creation.
     
    4. Inefficient API Query: The query sent in your request may be complex or include unnecessary fields, which could slow down processing.
     
    Solutions to Address the Timeout
     
    1. Increase the Axios Timeout
    You can increase the timeout value to allow more time for the API to respond. However, this is a temporary solution, as it doesn’t address the underlying cause of the delay.
     
    axios.post('/api/data/v9.2/contacts', contactData, { timeout: 20000 }) // 20 seconds
    .then(response => {
        console.log(response.data);
    })
    .catch(error => {
        console.error('Error:', error);
    });
     
    Adjust the timeout to a value that fits your needs, but avoid setting it too high, as it may make users wait longer for an error message if the server is unresponsive.
     
    2. Optimize the Dynamics 365 Environment
     
    Identify and Disable Unnecessary Plugins/Workflows: Check if any plugins, workflows, or Power Automate flows trigger when a contact is created. Disabling or optimizing these processes could reduce the response time.
     
    Optimize FetchXML Queries: If custom FetchXML queries are involved, ensure they’re efficient, and remove unnecessary fields or conditions that could slow the response.
     
    Limit Synchronous Workflows: Where possible, convert synchronous workflows to asynchronous ones to allow them to run in the background, reducing API response time.

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Sahan Hasitha Profile Picture

Sahan Hasitha 394

#2
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 123

#3
André Arnaud de Calavon Profile Picture

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

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans