MaGu
MaGu

Reputation: 1285

How to troubleshoot/fix Azure Function host crashing?

Azure portal displays that my azure function is up and running, but when I navigate to https://{functionapp-name}.azurewebsites.net via browser I'm getting

"Function host is not running."

But I definetly can see that processing happening sometimes by observing

{functionapp-name}/LogFiles/Application/Functions/Host/*.log file.

Any suggestions on troubleshooting this?

Upvotes: 2

Views: 4879

Answers (1)

Jerry Liu
Jerry Liu

Reputation: 17800

Check whether Function host is not running is consistent after restarting Function app. And make sure we checked the latest logs.

Basically if our function host fails to start, we can see details in Host log and functions won't process unless error is fixed.

For a successfully started function host, we can see logs like

Host initialized
Host started
Job host started
Host lock lease acquired by instance ID 'xx'.

If those pleasant information without error is all we got, and functions are triggered as expected, there's nothing to worry about.

Once there're some mistakes(e.g. in host.json and proxies.json settings) stop host starting, error is shown as below. Just try to fix according to official samples.

A host error has occurred
xxx //some error details
Stopping JobHost
Job host stopped

Upvotes: 1

Related Questions