An Azure NoSQL database service for app development.
Hi ,
Thanks for reaching out to Microsoft Q&A.
This is a known behaviour pattern with Cosmos DB change feed + AzFunctions (Python, especially on Flex Consumption): the trigger is checkpointing correctly (lease moving forward) but not invoking after the first batch due to host scaling/listener lifecycle issues or function not staying warm. In serverless + low throughput scenarios, the listener can go idle and not re-poll aggressively, even though the continuation token advances. The most common causes are: missing lease_container_name explicitly (leading to default mismatch), not setting create_lease_container_if_not_exists=True, low RU/s causing delayed polling, or Flex Consumption cold-start behaviour where the change feed processor is not continuously active. Also, Python worker+Cosmos trigger has intermittent reliability issues compared to .NET.
What typically fixes it? explicitly configure lease container + prefix, ensure max_items_per_invocation and feed_poll_delay are tuned, increase RU temporarily to validate, and most importantly switch to Elastic Premium plan or .NET function if this is production-critical. For Python, adding logging.info inside a loop over documents also helps validate batch processing (sometimes empty batches get swallowed silently).
Please 'Upvote'(Thumbs-up) and 'Accept' as answer if the reply was helpful. This will be benefitting other community members who face the same issue.