Azure-Functions icon indicating copy to clipboard operation
Azure-Functions copied to clipboard

Python warmupTrigger doesn't run on all workers on a scaled-out instance, and requests are sent to worker processes that aren't warm yet

Open empowerNate opened this issue 1 year ago • 3 comments

I found this happening on the Elastic Premium plan but assume the same problem happens on the Dedicated plan. I implemented a warmupTrigger with the V2 programming model, and it works on some of the worker processes within a scaled-out instance. However, it doesn't get called on all the workers, and some requests are sent to workers before they are fully warmed up. On an EP3 instance, it only got called on 2 of 4 workers, for example.

Additionally, I tried adding a long time.sleep to the warmupFunction of 10 * n_workers. However, the same worker where the warmupTrigger runs will start receiving requests before the warmupTrigger has finished, weirdly. I was hoping this could be a hack to make the warmupTrigger work despite the bug.

empowerNate avatar Mar 26 '24 01:03 empowerNate

@empowerNate Thanks for reporting. Is this still existing?

VineethReyya avatar May 06 '25 10:05 VineethReyya

Hi Vineeth, I'm not sure but I would assume it is still happening.

empowerNate avatar May 08 '25 15:05 empowerNate