-
Notifications
You must be signed in to change notification settings - Fork 437
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
Connection lost - Cannot call write after a stream was destroyed #903
Comments
Additional information:
|
@irgijs There's a bunch of connection lifecycle issues in current and older I did some work that was targeted at improving the situation over at https://github.com/tediousjs/tedious/compare/arthur/rework-connection-close, but I never finished turning it into a proper PR. Seeing the issues you're running into makes me think I should revive that branch and finish the work there. 🙇 Would you mind also sharing the modifications you made to the connection pool code? 😬 |
@arthurschreiber We only changed the package.json file to so that it would accept any tedious release (as peer dependency):
|
Try with this in the config: Works for me, in a local MSSQL |
@kevinkevp That will probably work because that will disable the TLS stream that is used for encryption purposes, greatly simplifying the internal connection handling. But it's not a proper fix, because encryption support is a hard requirement for many use cases. I'll take https://github.com/tediousjs/tedious/compare/arthur/rework-connection-close and see if I can polish it up! |
I am getting the same error as the @irgijs and therefore unable to update the tedious driver. |
@arthurschreiber Are you expecting to find a solution anytime soon? Is there something we can do to help you? |
@arthurschreiber We really want to update to the latest tedious version, but this issue prevents us from doing so. How can we help you to fix this problem? |
@arthurschreiber This open issue is blocking our way forward. We do need a more recent Tedious version but are depending on stream processing as well. You mentioned finishing https://github.com/tediousjs/tedious/compare/arthur/rework-connection-close. Can you give us an idea of when this might be expected? |
We have identified the issue. It is caused by the connection pool, see tediousjs/tedious-connection-pool#58 |
@irgijs @ErikJansenIRefact, since this issue looks like it's due to |
This issue is not only restricted to You get the same error if you use
|
@mastodon0 You can also specify an earlier TLS version to use just for the connection opened by tedious. See #914 (comment) |
I'm wondering if we could improve the messaging around this issue, to make it clearer to users what the issue is and how this can be worked around (and what the implications of those workarounds are). |
Since tedious version 2.7.0 the following error event is emitted. This error is still emitted in the newest release (v6.1.1):
Connection lost - Cannot call write after a stream was destroyed
We tested this with both SQL Server 2016 and 2017. We are still trying to reproduce the error and we will report back if we found something.
The text was updated successfully, but these errors were encountered: