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

Change timeout setting #125

Closed
drorata opened this issue Apr 21, 2017 · 9 comments
Closed

Change timeout setting #125

drorata opened this issue Apr 21, 2017 · 9 comments

Comments

@drorata
Copy link

drorata commented Apr 21, 2017

It seems like the default timeout is set to 15000ms. Is it possible to change it?

@lukemurray
Copy link
Owner

Yes that should be customizable.

@drorata
Copy link
Author

drorata commented Apr 24, 2017

It seems like the only two occurrences of timeout in the repository are this thread and two lines of code (line 1 and line 2). The search 15000 yields no results. Can you elaborate how to adjust the timeout?

@lukemurray
Copy link
Owner

Currently you can't. There needs to be code changes and I have not yet looked into how there libraries handle that.

What I meant by my previous comment was that, yes it should be customisable but currently it isn't.

@jnturton
Copy link
Contributor

If you're connecting to SQL Server you can put connectionTimeout and requestTimeout in the options string to be passed through to the node-mssql driver. I'm not sure if the other drivers implement similar options. See https://github.com/patriksimek/node-mssql for a complete list of node-mssql options.

@drorata
Copy link
Author

drorata commented Apr 24, 2017

I added the following:

connectionTimeout: 1500000,
requestTimeout: 1500000

to the file ~/.atom/connections.cson. But, still I get timeout after 15s.

@jnturton
Copy link
Contributor

jnturton commented Apr 24, 2017

Here's an example of an options string appearing in connections.cson, as created by the New Connection form. It sets the request timeout to one hour.

  {
    name: "Example"
    protocol: "mssql"
    user: "DzamoNorton"
    password: "blahblah"
    server: "localhost"
    database: "AdventureWorks"
    options: "domain=EXAMPLE_DOMAIN,requestTimeout=36000000"
  }

@drorata
Copy link
Author

drorata commented Apr 25, 2017

Thanks! No it works.

However, still, if the query is too complex, somehow/some-why the editor crashes or the query hangs.

@drorata drorata closed this as completed Apr 25, 2017
@jnturton
Copy link
Contributor

Good! Long-running, complex queries should be okay so long as they don't return a huge number of rows. When many rows are returned, data-atom can spend a long time building the HTML table of the reults. One day we need some kind of "send results to CSV file / clipboard" button.

@lukemurray
Copy link
Owner

Yep the large result sets is issue #71. Send results to file might be a good idea actually.

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

No branches or pull requests

3 participants