Skip to main content
Question

Intermittent timeout in createEnvelope API (Node.js) – Envelope created but response not received

  • April 28, 2026
  • 2 replies
  • 30 views

Forum|alt.badge.img+1

Hi Team,

We are facing an intermittent issue while integrating with DocuSign using the Node.js SDK.

Issue Description

We are calling the createEnvelope API from our Node.js application. In some cases:

  • The API call times out (60 seconds) on our side

  • However, the envelope is successfully created in DocuSign within ~7–10 seconds

  • A webhook (Connect event) is also received successfully

The problem is that the API response is not received by our application

Expected Behavior

The createEnvelope API should return a response with envelopeId once the envelope is created.

Actual Behavior

  • Envelope gets created successfully

  • Webhook is triggered

  • But the API call results in:

AxiosError: timeout of 60000ms exceeded

Environment Details

  • Runtime: Node.js

  • SDK: DocuSign Node SDK

  • Hosting: Azure Kubernetes Service (AKS)

  • Timeout: 60 seconds (also tested with higher timeout)

  • Occurrence: Intermittent (not consistent)

Code Snippet

const dsApiClient = new docuSign.ApiClient();
dsApiClient.addDefaultHeader("Authorization", "Bearer " + token);

dsApiClient.restClient = dsApiClient.restClient || {};
dsApiClient.restClient.agent = new https.Agent({
keepAlive: true,
maxSockets: 50,
keepAliveMsecs: 1000
});

dsApiClient.setBasePath(apiBasePath);
dsApiClient.timeout = 60000;

const envelopesApi = new docuSign.EnvelopesApi(dsApiClient);

const results = await envelopesApi.createEnvelope(accountId, {
envelopeDefinition: envelope,
});

Observations

  • The same implementation works fine in lower environments

  • Issue is only seen in Production

  • Based on logs, DocuSign completes processing quickly

  • Webhook confirms envelope creation even when API times out

Questions

  1. Is there any known issue where the createEnvelope API succeeds but the response is not returned?

  2. Could this be related to SDK behavior or connection handling?

  3. Are there any recommended configurations for Node.js SDK in containerized environments (AKS)?

  4. Is it safe to rely on webhook events as the source of truth in such cases?

 

Any guidance or suggestions would be greatly appreciated.

Thanks in advance!

2 replies

Leandro.Reis
Docusign Employee
Forum|alt.badge.img+5
  • Docusign Employee
  • April 29, 2026

Hi ​@Divya S,

You’re right that this behavior can happen in rare cases: the createEnvelope call completes successfully on the Docusign side, but the HTTP connection between your service and Docusign is interrupted or times out, so your app never sees the response.

To your questions:

  1. Known issue
    There is no general, ongoing bug where createEnvelope succeeds but never returns a response. What you’re seeing is almost always due to network / infrastructure timeouts or connection resets between your app and the Docusign API (for example, AKS ingress/load balancer timeouts, proxies, or transient network issues), not the API itself.

  2. SDK vs. connection handling
    The Node SDK uses Axios under the hood, so any intermittent AxiosError: timeout / socket hang up error means the underlying TCP/HTTPS connection was closed before Axios received the response. The fact that the envelope is created and Connect events are delivered confirms the API call reached Docusign and was processed; the failure is in returning the response over the network.
    As a quick test, you can:

    • Temporarily remove the custom https.Agent and see if behavior changes.
    • Ensure you’re on the latest docusign-esign SDK version.
    • Check whether any proxy, API gateway, or AKS ingress has a shorter idle/response timeout than your Node client.
  3. Recommended settings for Node.js + containers (AKS)
    A few practical recommendations:

    • Increase the SDK timeout to something comfortably above your worst-case envelope processing time (for example, 90–120 seconds) using dsApiClient.timeout (the blog “From the Trenches: Managing long-running createEnvelope calls” shows this for Node.js).
    • Add the X-Docusign-TimeTrack header to your requests so you can log server-side processing times and distinguish “Docusign is slow” from “Docusign responded quickly but the connection was lost in transit.”
    • Verify AKS ingress / load balancer / app gateway idle and response timeouts are greater than your client timeout, and that keep-alive / connection reuse isn’t conflicting with those settings.
  4. Relying on webhooks as source of truth
    Yes, it is safe and common to treat Connect (webhook) events as the source of truth for envelope status, especially in distributed systems where HTTP responses can be dropped. A robust pattern for your scenario is:

    • Include a unique transactionId in each EnvelopeDefinition when calling createEnvelope.
    • If your app sees a timeout or network error, use Envelopes::listStatus filtered by that transactionId to look up the envelope and recover the envelopeId without risking duplicates.
    • Use Connect events (and/or periodic status polling if needed) to keep your internal state in sync.

In short: what you’re seeing is consistent with intermittent network/infra issues rather than a Docusign API defect; increasing timeouts, tightening AKS/ingress settings, and using transactionId + webhooks/listStatus as your source of truth will make the integration resilient.

If you require further assistance, I would strongly recommend you to create a support ticket, since we can gather more detailed information (logs and whatnot) with you that are not recommended to share through a public post like this one.

I hope the above is helpful.

Best,

Leandro Reis
Developer Support Engineer | 8am-5pm GMT+1 | Docusign


Forum|alt.badge.img+1
  • Author
  • Newcomer
  • April 29, 2026

Thank you, Leandro Reis, for your inputs. We will look into this from our end.

Additionally, we would like to highlight that we started encountering this timeout issue after April 9th. Around the same time, we noticed that the SSL certificate for https://cdn.docusign.com was updated (on April 9th/10th).

Could this certificate change be a possible reason for the timeouts we are currently experiencing?