question

javier-8889 avatar image
0 Votes"
javier-8889 asked RasmusRimestad-9352 published

SQL AZURE : "Error: operation timed out for an unknown reason"

Hi team, I've been getting this error for most of the morning when making a query to my Azure SQL DB:

SQL AZURE : "Error: operation timed out for an unknown reason"

Don't see any resource or log indicating a resource issue.

Any idea about how to approach this?

instance server: digital-suplai.database.windows.net (serverless)

thank you very much






azure-sql-database
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @javier-8889, welcome to Microsoft Q&A forum. Apologies for the trouble you are facing.

I tried creating the serverless instance of Azure SQL in East US region and was able to access it both from portal as well as Management studio.

This mostly looks like intermittent region specific issue. Please let us know if you are still facing the issue and possible to provide how are you connecting to database and in which region. Also is this new database created or existing one?

0 Votes 0 ·

@javier-8889, just wanted to follow up on this thread. Are you still facing the issue or is it resolved?

0 Votes 0 ·

Hi @AnuragSharma-MSFT I am facing this issue

Mine is an Azure SQL instance in West US region. Its a newly created database. I am trying to access db from my nodejs application using mssql npm package. Is there something I am doing wrong?

0 Votes 0 ·

1 Answer

RasmusRimestad-9352 avatar image
0 Votes"
RasmusRimestad-9352 answered RasmusRimestad-9352 published

I know this is an old issue, I just want to share the way I solved it since this solution did not help me. I found some obscure timeout settings under "pool" which I increased to a ridiculous amount. I am not sure which one of these helped, but this solved my problem:

const timeout = 120_000_000;

      const pool = new sql.ConnectionPool({
        user: env.DB_USERNAME,
        password: env.DB_PASSWORD,
        server: env.DB_HOST,
        database: env.DB_DATABASE_NAME,
        options: { trustServerCertificate: true },
        requestTimeout: timeout,
        pool: {
          max: 1000, min: 1,
          idleTimeoutMillis: timeout,
          acquireTimeoutMillis: timeout,
          createTimeoutMillis: timeout,
          destroyTimeoutMillis: timeout,
          reapIntervalMillis: timeout,
          createRetryIntervalMillis: timeout,
        }
      });
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.