0

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.

Quy Truong
  • 413
  • 3
  • 9

1 Answers1

2

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.

Matias Quaranta
  • 13,907
  • 1
  • 22
  • 47
  • there is only one function/instance running with that lease configuration, also only that function has cosmosTrigger on the container, so it could be runtime problem. It really hard to re-procedure. – Quy Truong Apr 18 '23 at 12:54
  • 1
    It could be a condition that happens on runtime that makes the processing stop, adding the logs would help with visibility. I would also check the Function level logs, sometimes there are more evident things there, like a Function execution taking longer than the limits and being shut down. – Matias Quaranta Apr 18 '23 at 19:05