Hi,
To prevent your container app from restarting on high CPU/memory load, ensure it is designed to handle shutdowns gracefully.
Azure Container Apps support zero-downtime deployment when in single revision mode, which means they can handle automatic switches between revisions without downtime. However, since containers can restart regularly, you should not expect state to persist inside a container. Instead, use external caches for expensive in-memory cache requirements to avoid performance hits that might lead to restarts.
Please note that proper application scaling settings and resource management can help to prevent unexpected restarts due to resource constraints.
For a more tailored solution, you may need to adjust your container app's settings for scaling and resources or redesign the application's architecture to better manage resource utilization.
Please review this Microsoft documentation for "Application lifecycle management in Azure Container Apps": https://learn.microsoft.com/en-us/azure/container-apps/application-lifecycle-management
If you find the provided information helpful and it resolves your query, please consider accepting the answer. Your feedback is valuable and helps ensure the quality and relevance of the responses.