Closed CoolRice closed 5 years ago
Hi @CoolRice ,
Do you still have this issue? When I have EnableEndpointDiscovery set to true, and then I turn off cosmos, it takes 4 to 5 minutes before timming out. I need to force this to timeout after 5 seconds or so, but I could not get any workaround.
Did you find one?
Thank you,
Gustavo
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
When DB is down, it keeps output "Error trying to connect, refreshing the regions list from database account and will retry the request.", even if I have set maxRetryAttemptCount for RetryOptions.
Then I looked source code. It seems that maxRetryAttemptCount is hardcoded to 120 and no way to override it. https://github.com/Azure/azure-cosmosdb-node/blob/15cf138373beb86b9678e5cb4d09ad2c2fe1fb34/source/lib/endpointDiscoveryRetryPolicy.js#L76
Can you give any help?