Service Run Troubleshoot
Within this section you will find the common errors you might encounter when running your services with Qovery
Error: the container was immediately terminated by the operating system via SIGKILL signal (137).
Are you wondering why your container keeps restarting? This is a common issue when your container in a pod is consuming excessive memory. When this happens, the operating system terminates the container to free up memory resources.
To resolve this issue, you have two options:
- Increase your container's memory allocation: You can do this through the Qovery console by navigating to your application, selecting the "Settings" tab, and adjusting the memory limit for your container.
- Review recent application changes: If you've recently modified your application, updated libraries or framework, examine your code for potential memory leaks or changes in memory usage patterns. Optimizing your code to reduce memory consumption could resolve the restart issue.
My app is crashing, how do I connect to investigate?
Goal: You want to connect to your container's application to debug your application
First, try to use qovery shell
command from the Qovery CLI. It's a safe method to connect to your container and debug your application.
If your app is crashing in the first seconds, you'll lose the connection to your container, making the debug almost impossible, then continue reading.
Your app is crashing very quickly, here is how to keep the full control of your container:
Temporary delete the application port from your application configuration. This to avoid Kubernetes to restart the container when the port is not open.
Into your Dockerfile, comment your
EXEC
orENTRYPOINT
and add a way to make your container sleep. For example:#CMD ["npm", "run", "start"]CMD ["tail", "-f", "/dev/null"]Commit and push your changes to trigger a new deployment (trigger it manually from the Qovery console if it's not the case).
Once the deployment done, you can use qovery shell command to connect to your container and debug.
I can't access my application logs
If you are deploying a helm service, to get all the Qovery features (access your container logs, apply the stop/restart actions, display the pod status in the overview page), make sure to create an override and assign the macros qovery.labels.service
and qovery.annotations.service
to the labels and annotations of any deployed Pods/Deployments/Services/Jobs.
Override example:
commonLabels:mylabel: "test"qovery.labels.serviceannotations:qovery.annotations.service
These macros will be automatically replaced by Qovery during the deployment phase.