Home > Enterprise >  Azure functions - Functions host is not running
Azure functions - Functions host is not running

Time:02-04

I keep getting an error 503 on my health checks for my azure functions, it says error 503. Functions host is not running. It's very inconsistent and only happens once every few days, I'm on the consumption plan but looking at whether a premium plan would fix the issue.

CodePudding user response:

According to this thread, one possible cause of 503 service-unavailable responses is when the service consumes more memory than what is available under the consumption (serverless) plan, causing the service to be evicted. Switching to a dedicated hosting plan can fix this issue. According to Microsoft's documentation, it appears that the function is allowed a maximum of 1,536MB of memory at one time. Of course, it could also be the case that your function is exceeding any of the other service limits associated with that plan, so my advice would be to add instrumentation and code defensively.

CodePudding user response:

Availability zone (AZ) support isn't currently available for function apps on Consumption plans.

In Consumption Plan, the functions apps SLA is 99.95% of the time.

It won't failover to a different geo region, no matter the hosting SKU. Use Traffic Manager to achieve that level of redundancy.

Needless to say, all resources your function depends on need to exist in the 2nd region as well (SQL instances, Redis, Event Hubs, ...). You are responsible for keeping state consistent across regions (think Azure SQL auto-failover groups).

One notable exception is Cosmos DB, which (if configured) can have automagically-managed replicas in multiple regions. Your function will always use the same connection string.

The best you can do (IMHO) is to define the data redundancy as Geo-zone-redundant storage and let Azure handle this for you.

  •  Tags:  
  • Related