0

We just started getting this error yesterday but haven't changed anything in our app. Any ideas? If we restart the function app, it will run for a short time and then start giving us this error again. The function app is in PowerShell.

Host Error: Microsoft.Azure.WebJobs.Script: Host thresholds exceeded: [Connections]
2
  • 3
    Some code snippet could help Commented Nov 2, 2017 at 20:51
  • Thanks for the suggestion about code snippet. I was able to repo it. Commented Nov 3, 2017 at 14:53

2 Answers 2

2

This was recently added in the runtime to track running out of available connections on the VM

https://github.com/Azure/azure-webjobs-sdk-script/pull/2063

It should point to you running out of available connections. It could be wrong or correct, but I can't tell without looking at your functions themselves.

If you would like to discuss it, then you probably should use the repo above

Sign up to request clarification or add additional context in comments.

Comments

1

I'm not sure if it is the above change that caused this but it is a coding issue on my side that is now being handled correctly by Azure Functions. I created this small repo and after I commented out the close, I received the error. My real code is more complex but clearly somewhere I'm not closing it out.

$Ports = @(21,22,23,53,69,71,80,98,110,139,111,389,443,445,1080,1433,2001,2049,3001,3128,5222,6667,6868,7777,7878,8080,1521,3306,3389,5801,5900,5555,5901)

for($i = 1; $i -le $ports.Count;$i++) {
            $port = $Ports[($i-1)]
$client = New-Object System.Net.Sockets.TcpClient
$beginConnect = $client.BeginConnect("123.123.123.123",$port,$null,$null)
#$client.Close();
}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.