I think I figured out, it should be the SNAT port exhaustion issue caused by @Azure/cosmos 3.11.0 version that we are currently using. Github issue: https://github.com/Azure/azure-sdk-for-js/issues/15214
will try update the SDK and check.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi There, One of our prod Azure functions (written in node.js) suddenly started to get a [connect ETIMEDOUT] error when calling Cosmos last week. The function is a timer function that will run every hour, more than 50% of the calls will get this error while the others will succeed. No code change, and no deployment, and the Azure function has run with no issues previously. Our function is using JS SDK to query the cosmos, something like this:
const { resources } = await this.client
.database(this.config.database.id)
.container(this.config.container.id)
.items.query(querySpec)
.fetchAll();
The query is something like:
SELECT * FROM c WHERE c.whenCreated >= 'XXXX' AND c.type = 'XXXX'
It is for query items created within the last 2 days for a certain type. I have tried to call cosmos API from my local with postman, the query is always successful and super fast, and the results are only 300 small items.
We tried restarting the function app, it will run smoothly at the beginning but later on will get this ETIMEOUT issue again. Wondering what could be wrong? Thanks, Henry
I think I figured out, it should be the SNAT port exhaustion issue caused by @Azure/cosmos 3.11.0 version that we are currently using. Github issue: https://github.com/Azure/azure-sdk-for-js/issues/15214
will try update the SDK and check.