Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeout when trying to connect to a database using the mssql library #27833

Open
srcarvalho12 opened this issue Jan 26, 2025 · 0 comments
Open

Comments

@srcarvalho12
Copy link

Version: Deno 2.1.7

I'm getting the following error when trying to connect to an mssql database using the library mssql (https://www.npmjs.com/package/mssql):

ConnectionError: Failed to connect to <url_database_here> in 15000ms
    at file:///C:/<User_here>/Local/deno/npm/registry.npmjs.org/mssql/11.0.1/lib/tedious/connection-pool.js:85:17
    at Connection.onConnect (file:///C:/<User_here>/Local/deno/npm/registry.npmjs.org/tedious/18.6.1/lib/connection.js:849:9)
    at Object.onceWrapper (ext:deno_node/_events.mjs:518:26)
    at Connection.emit (ext:deno_node/_events.mjs:393:28)
    at Connection.emit (file:///C:/<User_here>/Local/deno/npm/registry.npmjs.org/tedious/18.6.1/lib/connection.js:970:18)
    at Connection.connectTimeout (file:///C:/<User_here>/Local/deno/npm/registry.npmjs.org/tedious/18.6.1/lib/connection.js:1222:10)
    at Timeout._onTimeout (file:///C:/<User_here>/Local/deno/npm/registry.npmjs.org/tedious/18.6.1/lib/connection.js:1167:12)
    at cb (ext:deno_node/internal/timers.mjs:64:31)
    at callback (ext:deno_web/02_timers.js:58:7)
    at eventLoopTick (ext:core/01_core.js:212:13) {
  code: "ETIMEOUT",
  originalError: Error: Failed to connect to <url_database_here> in 15000ms
    at Connection.connectTimeout (file:///C:/<User_here>/Local/deno/npm/registry.npmjs.org/tedious/18.6.1/lib/connection.js:1222:26)
    at Timeout._onTimeout (file:///C:/<User_here>/Local/deno/npm/registry.npmjs.org/tedious/18.6.1/lib/connection.js:1167:12)
    at cb (ext:deno_node/internal/timers.mjs:64:31)
    at callback (ext:deno_web/02_timers.js:58:7)
    at eventLoopTick (ext:core/01_core.js:212:13) {
    code: "ETIMEOUT"
  },
  name: "ConnectionError"
}

The timeout happens even if I pass the Encrypt=false flag in the connection string.
This same connection is normally made when using nodejs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant