question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

3.3.0: requestTimeout in config is not passed to connection's config

See original GitHub issue
$ cat node_modules/mssql/package.json | grep version
  "version": "3.3.0"

$ node --version
v6.9.1

Code:

 sql: function(library, dbConfig) {
      logger.debug("Connecting to SQL");
      return new Promise(function(resolve, reject) {
        var conn;
        conn = new library.Connection(dbConfig);
        logger.trace("Connection config:", dbConfig);
        return conn.connect(function(err) {
          if (err != null) {
            logger.error("SQL connection failed", dbConfig, err);
            return reject(new Error(err));
          } else {
            logger.debug("Connected.");
            logger.trace("Connection details:", conn);
            return resolve(conn);
          }
        });
      });
    },

However when I stop on line that has logger.debug("Connected."); (3rd to last LOC from the bottom) I see this:

debugger output

Also the conn config options (forgot those in the screenshot):

conn.config.options.requestTimeout
15000

It works fine, most of the time. But I have some fairly long running requests in this app, 5 minutes or more. Many of them are failing because the requestTimeout is too low.

I believe I am following the docs though and passing in the requestTimeout in the appropriate place.

(I’ve added an event listener for the ‘error’ event after spotting that section of the docs 😉 )

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
GregorioLopezcommented, Dec 13, 2016

I had the same problem. I too think the subobject options is not well documented.

I didn’t know how to execute heavy querys. Thanks to jcollum.

0reactions
dhensbycommented, Mar 8, 2019

v3.3.0 is very old and out of support. We haven’t had reports of this in v4 and we are now running v5 (with v6 in alpha) so I’m closing this as outdated

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to increase request timeout in IIS? - Stack Overflow
In IIS Manager, right click on the site and go to Manage Web Site -> Advanced Settings. Under Connection Limits option, you should...
Read more >
Kafka Connect Worker Configs | Confluent Platform 4.0.0
This is the total amount of time, not per task. ... request.timeout.ms ... An id string to pass to the server when making...
Read more >
Kafka 3.3 Documentation
Apache Kafka can be started using ZooKeeper or KRaft. To get started with either configuration follow one the sections below but not both....
Read more >
cqlsh (startup options) | CQL for DSE 5.1
When no port is specified, the connection uses the default port of ... [cqlsh 5.0.1 | Cassandra 3.3.0 | CQL spec 3.4.0 |...
Read more >
Changelog - Cypress Documentation
config.js file is not automatically merged. See migration guide. Addresses #24133. Angular providers passed as part of the mounting options will be assigned...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found