It’s been a while since I’ve developed any Azure Functions. There was a time, where I was knocking them out very regularly. Well this week whilst working on a new project I jumped back into PowerShell Azure Functions, and cloud being cloud they’ve moved on in recent times. PowerShell is now a supported language (with the release of PowerShell 7) which is awesome. Goodbye Experimental Language warnings. However I quickly ran into what appears to be a common(ish) issue on the Azure Functions Consumption Plan of PowerShell Azure Functions Concurrency.
The particular scenario I had is;
When I looked in the event logs, when concurrent requests were being made I was seeing timeouts and the following error.
“Azure PowerShell Function is queuing requests as there are no available runspaces”.
The resolution that worked for me after a lot of reading and understanding the profile of my Functions was to set;
These are Application Settings. You configure them on your Azure Function App. For more information on these settings refer to the documentation here. If you encounter this problem a configuration that works for you will depend on how many functions you have, how long they run for and the concurrency across them.
If you are running multiple PowerShell Azure Functions in the same Azure Function App on the Consumption Plan there is a high chance you are going to run into an issue with PowerShell Azure Functions Concurrency. You will need to workout the profile of your functions and update the Functions_Worker_Process_Count and PSWorkerInProcConcurrencyUpperBound Application Configuration settings accordingly.
A few weeks back the Microsoft AI Tour was in Sydney Australia. There was a…
If you're anything like me you always have PowerShell open, and often both PowerShell and…
Decentralised Identity is a technology I'm passionate about and have written many posts and tools…
Over two years ago I authored a PowerShell Module that enabled the automation of 1Password.…
Buried in my PowerShell Snippets Vol 4 post from 2021 is the PowerShell script and…
Short post on how to recovery from "The Windows Subsystem for Linux instance has terminated"…
This website uses cookies.