-
Notifications
You must be signed in to change notification settings - Fork 465
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
Inactive connection can't reconnect with out VS Code Restart #785
Comments
Thanks for raising this. We'll see if we can get someone to investigate later this sprint. It'll likely be next week before we make progress on this one. |
just put someone on it who wants to do step 2 ...go for a walk :) |
So I came across this bug as I was preparing for a lunch & learn for my company; for me, 'go for a walk' is more like 'blink twice'. Sysinfo since it's different than OP:
|
I'm having the same problem. It seems to get worse with time. When I first updated the extension to 0.3.0 and updated VSCode to 1.10.2 it works consistently for a while but I suddenly got the disconnect error. I could restart VSCode and get it to work for a while, but then it would error out sooner and sooner. It's practically unusable.
|
I'm attempting to repro this issue since it sounds pretty straight-forward. One clarifying detail I'd like to ask @zackeezy, @julielerman, and @IndifferentDisdain: were you connected to an Azure database or an on-prem server? |
@benrr101 I was connecting using localhost. The database was on the same machine as my VS Code instance. |
@benrr101 localhost as well |
@benrr101 : azure |
Thanks for the feedback folks! I've gotten a repro scenario set up in Ubuntu against Azure where if I execute around 3 queries in quick succession, the backing tools service will crash and not begin working again until VS Code is restarted. I'm currently working on debugging this since there isn't anything useful coming up in the logs. As a side note, this I suppose is covered in the first issue on the known issues page for the extension, but I think that's a cop-out akin to just saying "it's beta! it might not work!" We'll get to the bottom of this |
More data! I regularly use a VPN over wireless and find this problem consistently when VS Code has been open and had an open, working SQL connection. It is correlated to any one of the following:
Is it unable to recover from a lost network connection? FYI:
|
@andrewralon Thanks for your specs! Right now, we're hot on the trail of a very bizarre bug where on Ubuntu the backing tools service will exit -- not crash, exit -- for no reason whatsoever. I'm having such a hard time debugging it due to it's ability to evade all my attempts at breaking before it exits, I'm reaching out to some dotnet corefx devs to get their opinion. I'm unsure if this is the same as the connectivity bug @julielerman originally raised, since it sounds more like the bug raised by @zackeezy and @IndifferentDisdain. Nevertheless it's a massive issue that we need to solve. Thanks again for your patience. We really want to make sure we've got the experience right for this tool. |
@benrr101 Of course! I love this tool and and I MUCH prefer using VS Code to SSMS as much as possible. Keep up the great work. That said, I've already written a script to disable/enable the wireless adapter so I can power on. Haha. |
@andrewralon I have a q for you that's loosely related to this thread. Are you on https://gitter.im/Microsoft/mssql under some alias (that I'm not discovering)? |
@julielerman I am now. |
I wanted to add another update to this so you don't think we're leaving you hanging. Unfortunately my efforts on this bug were deprioritized over the last couple weeks due to 1) need to get others unblocked from other bugs, 2) catching a cold, and 3) getting my wisdom teeth removed (it's been a crazy two weeks). Now that things are returning to normal, I'll be attempting to dig into the native side of the dotnet process and see if I can get more info on why the process is exiting. |
Thanks. Hit me up for more details as needed on a Windows box. For me, it is predictably linked to losing connectivity / waking the PC from sleep / wireless adapter crapping out. When I restart VSCode, I can connect like normal and all is well. |
Was there any update on how log it would be before a fix rolled out or a work around? |
As an update, we're currently looking into upgrading our code to utilize .NET Core v2. This will allow us to get a wide variety of new functionality, improve on our installation story, and we hope will fix this issue. I believe our target for a release using .NET Core 2 is June. |
You may want to try the latest alpha which includes .Net Core 2, it may fixes your issues: |
We've added some logic to automatically reconnect once a connection goes inactive in the new 1.3.0 release, which should resolve this problem. If you still see issues with connections, feel free to reopen or file a new bug though |
@MattIrv Did you actually solve the problem? it seems to still exist on the newst version v1.22.0: repro-steps:
I don't like the solution to "automatically reconnect". I would rather like a solution where we can clear the cache with a manual click, restart the mssql-service or delete the folder where the cached-files are. |
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.11
OS Platform: Darwin
RID: osx.10.11-x64
Steps to Reproduce:
Next experiment ...more useful results (they may have been there the first time but I was focused on the problem, not data collection)
Again it fails to make the connection, even when I explicitly choose Connect and the profile. The error message it gives when I try to do it via "connect" is "Failed to Connect ..SocketException invalid argument"
Closing and re-opening code fixed the problem again.
The text was updated successfully, but these errors were encountered: