Thanks for reaching out! There could be a few reasons why your Azure Container App is crashing when you try to access your files. Here are some common ones and how to troubleshoot them:
- Application Crash or Exception: If your app hits an error it can't recover from, the container might exit. Check your code for unhandled exceptions or errors.
- Out of Memory (OOM) Errors: If your app uses more memory than allocated, the system might kill the container. Check your memory settings and monitor usage.
- Incorrect Exit Code or Misconfiguration: A nonzero exit code means abnormal termination. Make sure your app is configured correctly, including environment variables and startup commands.
- Normal Application Termination: If your app is meant to complete its task and exit, this is expected. If not, adjust your app logic.
To dig deeper, check your container app logs:
- Sign in to the Azure portal.
- Search for your container app's name.
- Select your container app from the resources section.
- Go to Monitoring and select Log stream.
If the log stream shows the revision is scaled to zero, deploy a new revision with a minimum replica count of 1.
Also, try using the Diagnose and solve problems tool in the Azure portal to check your container app's health, configuration, and performance.
References :
- Troubleshoot a container app
- Troubleshoot container create failures in Azure Container Apps
- Troubleshoot storage mount failures in Azure Container Apps
Hope this helps! Let me know if you need more assistance.
If this answers your query, do click Accept Answer and Yes for "Was this answer helpful." And if you have any further questions, let us know.