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

喜欢而已 提交于 2020-06-13 06:55:13

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/34930141/how-to-set-query-timeout-using-atom-editor-data-atom

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!