Azure Function CosmosDB Trigger does not pick-up the changes in one partition

359 Views Asked by At

I'm facing a problem with the Azure Function v4 with the cosmos DB trigger. The function doesn't pick up the changes on a specific Partition value, however still running properly in other partition value. There is no sign of function running that change in the function log.

It's only resolved after I restart the function, then the changes on that partition have been pick up. Does anyone know the root cause of this? I'm trying to search through Microsoft document but have not found anything so far.

1

There are 1 best solutions below

2
Matias Quaranta On

Reference: https://learn.microsoft.com/azure/cosmos-db/nosql/troubleshoot-changefeed-functions#some-changes-are-missing-in-your-trigger

Start by enabling logs, Debug level logs include which Function App instance is acquiring which lease. Most commonly this is either due to another Function App "stealing" leases (you have 2 or more Function Apps deployed or running with the same Lease configuration) or there is a runtime problem and that partition/lease being acquired, failed processing, and being released.

That can be seen on the logs, with Warning level enabled.