Drain mode is activating automatically and stopping my function app from running

Inaki Bergara 15 Reputation points
2023-01-11T08:33:03.1366667+00:00

Hi,

I have a function app triggered by an IOT hub incoming message. It works well, until recently when suddenly it stopped running. Checking the logs, I found "DrainMode mode enabled", which stops the listener and makes my function app do nothing.

Googling around, it seems this is meant to run for automatic scaling, with the idea that if the load is low it will stop some instance of the function app. However, it's completely stopping it all for me.

I have no idea why this is happening, or how to keep my function executing. I saw there was a "scale out" option for the function app, so I disabled it, but it doesn't seem to have helped.

Could I please get some kind of direction on how to stop this drain mode bring down my system, please?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,706 questions
Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,258 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.