You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to deploy a containerized azure function (.NET 8.0 Isolated) Using the base dockerfile provided, the application will run successfully on the cloud.
This Function app has 8 service bus listeners, which are pretty consistently receiving data.
After about a 2-5~ minute interval the app will go to "sleep" and require a visit to the function app site to wake it up. This takes about 30s to 90s and does not work 100% of the time.
This obviously is not great for a service bus listener or any workload. Sending a service bus message to any topic does not wake up the app. I have also verified that the (always on) checkbox is checked.
Workaround fix
The following simple timer trigger keeps the app running
publicclassKeepAlive{privatereadonlyILogger_logger;publicKeepAlive(ILoggerFactoryloggerFactory){_logger= loggerFactory.CreateLogger<KeepAlive>();}/// <summary>/// By Default Docker Container will stop after a few minutes of inactivity. This keeps the app alive/// </summary>[Function(nameof(KeepAlive))]publicvoidRun([TimerTrigger("*/30 * * * * *")]TimerInfomyTimer){
_logger.LogInformation($"Running Keep Alive on Netsuite Listener");}}
Suggestion
This should not be a problem on service plans that are supposed to operate constantly. This either needs to be kept awake in the background or some documentation on this should be provided.
Details
Runtime: dotnet-isolated in docker container
.Net Version: 8.0
Service Plan: B1 (the app should not be sleeping)
The text was updated successfully, but these errors were encountered:
Purpose
When attempting to deploy a containerized azure function (.NET 8.0 Isolated) Using the base dockerfile provided, the application will run successfully on the cloud.
This Function app has 8 service bus listeners, which are pretty consistently receiving data.
After about a 2-5~ minute interval the app will go to "sleep" and require a visit to the function app site to wake it up. This takes about 30s to 90s and does not work 100% of the time.
This obviously is not great for a service bus listener or any workload. Sending a service bus message to any topic does not wake up the app. I have also verified that the (always on) checkbox is checked.
Workaround fix
The following simple timer trigger keeps the app running
Suggestion
This should not be a problem on service plans that are supposed to operate constantly. This either needs to be kept awake in the background or some documentation on this should be provided.
Details
Runtime: dotnet-isolated in docker container
.Net Version: 8.0
Service Plan: B1 (the app should not be sleeping)
The text was updated successfully, but these errors were encountered: