An Azure service that provides a general-purpose, serverless container platform.
Hello Gaurav Tamkoria,
Encountering the error 'Container ns-dbs-service was terminated with exit code 1' signals that your application within the container is experiencing a failure. If you run into this error, check these to determine cause, this generic error code points to an abnormal termination, likely stemming from application crashes due to unhandled exceptions, misconfigurations such as incorrect environment variables or startup commands, or resource constraints where the container exceeds its allocated limits.
To effectively diagnose this issue, your primary focus should be on examining the container's logs. These logs are critical, as they provide detailed error messages and stack traces that reveal the precise cause of the termination. Alongside log analysis, carefully review your container's configuration settings and leverage Azure's diagnostic tools for deeper insights into the container's lifecycle.
To Access Container Logs:
- In Azure portal, In the left-hand navigation, under the "Monitoring" section, select "Log stream" or "Logs". Choose the ns-dbs-service container from the dropdown menu and examine the logs for error messages, stack traces, or warnings that precede the termination. Pay close attention to any database connection errors, file access issues, or application-specific exceptions.
To review Recent Revisions and Changes:
- In the left-hand navigation, under the "Application" section, select Revisions and review the revision history to identify any recent deployments or configuration changes. If a recent revision correlates with the start of the issue, consider rolling back to a previous, known-good revision. Also in the application section, check the configuration menu, to review environment variables, and container settings.
And to check Environment Variables:
- In the left-hand navigation, under the "Application" section, select Configuration and review the environment variables configured for your container app, then verify that all necessary variables, especially those related to database connections or external services, are correctly set.
Also, for better understanding please refer to this document.