Error executing query on Azure Synapse via Node.js/NestJS application using Tedious

Luan Lopes 20 Pontos de reputação
2025-05-28T11:03:20.3266667+00:00

Hello, Last week (around May 21, 2025), I started facing an issue when running queries on Azure Synapse through my Node.js application (using NestJS and the tedious library for SQL Server connections).

The application logs returned the following error:

Error while executing a query on Synapse: AggregateError 	

This issue occurred during data importation operations and caused failures in reading from Synapse. I would like to understand whether this was due to an instability in Azure Synapse at the time, or whether it could be a problem on my side (network, token expiration, etc.).

Has anyone else experienced similar issues recently?

Evidence: Imagem do usuário

Azure
Azure
Uma plataforma de computação em nuvem e uma infraestrutura para criar, implantar e gerenciar aplicativos e serviços por meio de uma rede mundial de datacenters gerenciados pela Microsoft.
139 perguntas
{count} votos

Resposta aceita
  1. Smaran Thoomu 24,110 Pontos de reputação Equipe Externa da Microsoft Moderador
    2025-06-09T07:13:40.3466667+00:00

    Hi Luan Lopes

    Thank you for sharing the detailed logs.

    Based on the error trace - particularly AggregateError and issues during token handling (tedious/lib/token/handler.js) - the issue appears to be related to authentication, token parsing, or streaming failures while connecting to Synapse via the Tedious driver.

    To help isolate the root cause, please consider the following checks:

    1. Token Expiration or Misconfiguration:
      • If you're using Azure Active Directory (AAD) authentication, ensure the token is valid and not expired at the time of the request.
        • You might also want to enable verbose logging for the Tedious library to capture token details (excluding sensitive values).
        1. Network Instability or DNS Resolution:
          • Check if your Node.js app had transient connectivity issues (e.g., DNS failures, firewall rules, or timeouts) around the failure time (May 21, 2025, 12:39 PM).
          1. Synapse Backend Issues:
            1. Tedious Compatibility:
              • Ensure you’re using a supported version of the Tedious driver compatible with Azure Synapse.
                • Consider retry logic for transient failures and handling ReadableStream errors, as seen in your stack trace.

    Let us know:

    • If the issue still persists or was only observed during that specific time window.
    • Whether you're using SQL authentication or Azure AD (and how you're generating/accessing the token).

    We’ll be glad to assist further with this information.

    0 comentários Sem comentários

0 respostas adicionais

Classificar por: Mais útil

Sua resposta

As respostas podem ser marcadas como Respostas Aceitas pelo autor da pergunta, o que ajuda os usuários a saber a resposta que resolveu o problema do autor.