Azure / azure-cosmosdb-node

We recently announced deprecation of JS v1 SDK and this repo. Starting September 2020 Microsoft will not provide support for this library. Existing applications using library will continue to work as-is. We strongly recommend upgrading to @azure/cosmos library.
https://github.com/Azure/azure-sdk-for-js
MIT License
141 stars 108 forks source link

After fail over to another region and delete the old region, the connection is still try to talk to the old region #225

Closed Huan9 closed 5 years ago

Huan9 commented 6 years ago

We did a fail over from East US 2 to West US due to some resources constrain. After the fail over is done, we have to manually delete the East US 2 region. However, after fail over, for almost 2hours time period, all our requests using this library fail to get any results back.

As our service make request to endpoint https://xxx.documents.azure.com/ to query data, but we got error response like "{"code":403,"body":"{\"code\":\"Forbidden\",\"message\":\"Database Account xxx-eastus2 does not exist\\r\\nActivityId: c2afca5a-2f09-4a3f-b85c-6f0b22a10cc2, Microsoft.Azure.Documents.Common/1.19.121.4\"}","activityId":"c2afca5a-2f09-4a3f-b85c-6f0b22a10cc2"}"

I have to restart my service to make it work again. The reason I suspect it is the node package is because we have team using the docdb c# library did the same fail over and delete region work, and their service did not have any problem to talk to the new region and no need to restart the service.

Any suggestions?

moderakh commented 6 years ago

@Huan9 thanks for reporting this here. We will look into this.

southpolesteve commented 5 years ago

We have recently announced deprecation version 1.x of the Azure Cosmos JavaScript SDK. We will end support for the documentdb package and this repo on August 30, 2020. Please update to our new package @azure/cosmos as soon as possible. If you encounter any issues, you can raise them in the Azure central JS SDK repo. If something is preventing you from upgrading to the latest version of the SDK, you can always email me directly: stfaul@microsoft.com