Azure / Azure/Azure-Functions

Azure Functions Error HTTP Error 500.37 - ANCM Failed to Start Within Startup Time Limit

Open
#1,441 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
PowerShell
Stars
1.1k
Forks
215
Avg merge
4h 2m
Merged PRs (30d)
1

Description

Hello

I have upgraded a Azure Functions application to .NET Core 3.1 and runtime version 3. Since then my app shows the following message a couple of times during the day and the app hangs.
![Capture](https://user-images.githubusercontent.com/425205/71502269-8836e000-286f-11ea-9e64-a69f9f85187c.PNG)

The only solution is to start en stop the app again. In the portal i get this message:

![image](https://user-images.githubusercontent.com/425205/71502448-87527e00-2870-11ea-9ac2-f15fa4cd53e8.png)

When i look in the Eventlog.xml i see some error message like

Application '/LM/W3SVC/1452214351/ROOT' with physical root 'D:\Program Files (x86)\SiteExtensions\Functions\3.0.12939\32bit\' failed to load coreclr. Exception message: Managed server didn't initialize after 120000 ms.

or

Application: w3wp.exe CoreCLR Version: 4.700.19.56402 .NET Core Version: 3.1.0 Description: The process was terminated due to an unhandled exception. Exception Info: System.AggregateException: One or more errors occurred. (The handle is invalid.) ---> System.IO.IOException: The handle is invalid.at System.ConsolePal.WindowsConsoleStream.Write(Byte[] buffer, Int32 offset, Int32 count)at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)at System.IO.StreamWriter.WriteLine(String value)at System.IO.TextWriter.SyncTextWriter.WriteLine(String value)at System.Console.WriteLine(String value)at Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost host, CancellationToken token, String startupMessage)at Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost host, CancellationToken token, String startupMessage)at Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost host, CancellationToken token) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)at System.Threading.Tasks.Task.Wait()at Microsoft.Azure.WebJobs.Script.WebHost.Program.Main(String[] args) in C:\azure-functions-host\src\WebJobs.Script.WebHost\Program.cs:line 28

I have attached the complete log file.
[eventlog.zip](https://github.com/Azure/Azure-Functions/files/4004303/eventlog.zip)

regards
Dieter

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.