Closed smv-orrin closed 5 years ago
@smv-orrin Is it possible it really is hitting a timeout? (We have a small class of bugs we're working on where we're getting an incorrect time-out... From quick inspection this bug doesn't seem to be in that category.)
This is a real bug. Before I submitted the ticket, I confirmed the issue by running the same query in: A) the mongo cli in a terminal window, and B) VS Code the mongo cli successfully returned results in a couple of seconds, VSCode failed with a TImeout
Sorry, forgot to mention, just confirmed it again by testing the same query in both the mongo cli (terminal) and VSCode, with the same results - cli succeeded, vscode failed.
@smv-orrin Thanks. How long does the query take to execute in mongo console?
couple of seconds I tried attaching a video so you could see that the cli was returning quickly, but I can't attach a video it seems. I also don't see my comment history on this issue, I remember taking a closer look at this and noticing that it seemed to be tied to my use of the $hour function. When I comment out the $hour function (and replace with a straight-up integer), the query runs in VSCode without issue.
so, long story short, if I use $hour() (as below) it fails with a timeout, if I give it a fake hour it works:
"_id":0,
"date_intended": {
$dateToString:{"date":"$date_intended","format":"%Y-%m-%d"}
},
"hr":{$hour:"$date_time"}
}
Are you using the emulator by any chance?
Hey - not sure what you're asking... I'm not using any emulator that I'm aware of... I'm using the Azure Cosmos DB Extension against a real mongo DB server (running Mongo 3.6). I also have the mongo cli installed locally
We support attaching to the COSMOSDB emulator (Mongo or SQL), just needed to rule that out, thanks.
is there any update on this issue,
"Timed out executing MongoDB command "use [DBName]"
Extension name: Azure Cosmos DB IDE: Visual Studion Code
Is anyone knows source code url on github for the extension, and way to dubug the same.
@pspkshah, @smv-orrin This is weird. I can't repro it with the original query. We have seen "timeout" incorrectly reported as the error in some cases when the real error is not getting picked up properly (there's a P1 task scheduled in an upcoming release to rewrite the code responsible for spawning (https://github.com/Microsoft/vscode-cosmosdb/issues/838), but we've also fixed all the known ways of getting into this issue in the first place. It looks like this is probably hitting another one.
Could you try an experimental version that may report better errors? Download https://dev.azure.com/ms-azuretools/_apis/resources/Containers/2511844?itemPath=vsix%2Fvscode-cosmosdb-0.9.2-alpha.vsix, then use command palette -> Extensions: Install from VSIX... to install it. Please let us know what errors you get from the query.
Thanks! Stephen
~ BTW, you're more than welcome to explore our code and/or debug yourself, let us know if you have questions. You can find our repro from vscode, or else by clicking on Report Issue on an error dialog:
(Edited: I can't repro it with the original query)
(Edited link: the original link doesn't work if you're not logged in.)
@pspkshah, @smv-orrin This is weird. I can't repro it with the original query. We have seen "timeout" incorrectly reported as the error in some cases when the real error is not getting picked up properly (there's a P1 task scheduled in an upcoming release to rewrite the code responsible for spawning (#838), but we've also fixed all the known ways of getting into this issue in the first place. It looks like this is probably hitting another one.
Could you try an experimental version that may report better errors? Download https://dev.azure.com/ms-azuretools/_apis/resources/Containers/2511844?itemPath=vsix%2Fvscode-cosmosdb-0.9.2-alpha.vsix, then use command palette -> Extensions: Install from VSIX... to install it. Please let us know what errors you get from the query.
Thanks! Stephen
~ BTW, you're more than welcome to explore our code and/or debug yourself, let us know if you have questions. You can find our repro from vscode, or else by clicking on Report Issue on an error dialog:
I am getting below error while tried accesing above link
{"$id":"1","innerException":null,"message":"TF400813: The user 'Windows Live ID\xxx@xxx.com' is not authorized to access this resource.","typeName":"Microsoft.TeamFoundation.Framework.Server.UnauthorizedRequestException, Microsoft.TeamFoundation.Framework.Server","typeKey":"UnauthorizedRequestException","errorCode":0,"eventId":3000}
My Email address is not authrized on the mentioned URL. Please give access or make it open seperate latest branch for all
Sorry, thought I'd corrected that link. It should be https://dev.azure.com/ms-azuretools/AzCode/_build/results?buildId=2476, then you have to click on Artifacts->vsix
@pspkshah @smv-orrin I'd love to hear if anyone tried the experimental build (it's easy to uninstall afterwards and reinstall the current version), and could let me know if they see more helpful error messages.
The link is here: https://dev.azure.com/ms-azuretools/AzCode/_build/results?buildId=2476 Instructions are here: https://github.com/Microsoft/vscode-azuretools/wiki/Install-Insiders-Build
Thanks! Stephen
Hi All, just update your VS Code Cosmos db extension with latest version. This issue take care and no more exist. I just updated with latest version and time out error is not coming.
Thanks for letting us know.
Repro steps: