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

name: 'RequestError', message: 'SqlContext Error. Failed on step "__result__" with: "No connection is specified for that request."', code: 'ENOCONN', step: '__result__' #52

Open
corymickelson opened this issue May 13, 2016 · 7 comments

Comments

@corymickelson
Copy link

So, this is the result that I get when trying to run in a lambda. The query runs and returns fine when executed locally, any idea's why or what I may be able to do to get this to work on aws lambda. Thanks

@jhovgaard
Copy link

Same experience here, but from Windows to Ubuntu.

@takotuesday
Copy link

takotuesday commented Jan 24, 2017

I am experiencing the same issue. Locally everything works fine but when deployed to my Heroku-like platform I get the following error:

{
	"name": "RequestError",
	"message": "SqlContext Error. Failed on step \"__result__\" with: \"No connection is specified for that request.\"",
	"code": "ENOCONN",
	"step": "__result__"
}

@calvinb @Prestaul it'd be greatly appreciated if we could get some feedback on this. I was originally using node-mssql, and was experiencing a similar problem. I thought I might be able to leverate seriate's easy global connection and that would solve the issue. My config looks like this:

var conOptions = {
  user: user,
  password: password,
  server: server,
  database: database,
  pool: {
    max: 10,
    min: 4,
    idleTimeoutMillis: 30000,
  },
};

@calvinb
Copy link
Contributor

calvinb commented Jan 25, 2017

@takotuesday Looks like other folks are having the same problem with other tedious-based libraries. I just ran across this solution that sounds like it has worked for some: tediousjs/node-mssql#383 (comment)
I'm interested to hear if it works for you.

@takotuesday
Copy link

takotuesday commented Jan 25, 2017

@calvinb it seems like that solution requires me to use node-mssql instead of seriate. Is that the recommended solution? Also, after trying the implementation, I am still getting connection errors, only in this instance they are more generic.

{
"name": "ConnectionError",
"message": "Connection is closed.",
"code": "ECONNCLOSED"
}

@calvinb
Copy link
Contributor

calvinb commented Jan 26, 2017

@takotuesday If you see a simple way we could get seriate to use the same approach as node-mssql does to work in this scenario, please let us know or submit a pull request. Whether I would recommend switching libraries would depend on how the estimated effort of switching compared to the estimated effort of fixing seriate for this use case.

@calvinb
Copy link
Contributor

calvinb commented Jan 26, 2017

@takotuesday To clarify, seriate already uses node-mssql; the fix to seriate would likely just be adding a seriate option to use the node-mssql option that fixes the problem.

@billsinc
Copy link

I added "name": "default", to my config and it seemed to fix the issue.

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

5 participants