oneliojr
oneliojr

Reputation: 63

How to set query timeout using Atom Editor & Data-Atom?

I'm start using Atom with the package Data-Atom for SQL Server connection.

But I keep getting this error when I execute a query:

Results: "Error (ETIMEOUT) - Timeout: Request failed to complete in 15000ms"

But on Visual Studio the same query executes without errors, so the server is ok I presume.

There is a way to resolve this?

Upvotes: 1

Views: 721

Answers (1)

Dzamo Norton
Dzamo Norton

Reputation: 1389

Update: The connection options weren't being passed through to node-mssql but after this PR is merged they will be.

In my attempt to set the timeout to one hour I added the below to data-atom-connections.cson.

{
    name: "sqlserver01"
    protocol: "sqlserver"
    user: "dzamo"
    password: "norton"
    server: "sqlserver01.localdomain"
    database: "AdventureWorks"

    options: "requestTimeout=36000000"
}

And nothing happened. I had to go and hardcode it in ~/.atom/packages/data-atom/node_modules/tedious/lib/connection.js to get a long-running query to work. I'll investigate this a bit more and open a bug on github.

Upvotes: 1

Related Questions