For various reasons your application can terminate abruptly. Two cases of crash may happen:
They are detected directly when you deploy your application, if it crashes before binding the allocated network port, your deployment fails.
Two situations are the most common causes of runtime crashes:
- Runtime error of your application (uncaught exception, segfault of a library/runtime)
- Temporary error of an external resource
When a runtime crash occurred we automatically restart your container. If your application stopped again in the 5 minutes after being restarted, we won’t restart it directly, but 5 minutes later.
A limit of 12 restart operations exist. It means that after 6 hours and 30 minutes, your application will not be accessible anymore (The last cool-off duration is 1 hour).
How do I know my app has crashed?
When such an event occurred, you’ll receive notifications, as well as your collaborators for the concerned application. You’ll receive a notification after the 2nd, 5th and 12th crashes (following the restart policy detailed previously).
It means that if your app crashed once for a temporary reason, it will be automatically restarted. If it does not crash anymore, you will not receive an email. But if it crashes in a loop, you’ll get a notification in the minute.
You’ll also find the ‘crash’ events in your app timeline on the dashboard.
What to do?
We strongly advise you to look at the logs of your application using the web dashboard or by using the CLI tool.
According to the information gathered, you should then modify your application to fix the issues which lead to this instability.
Don’t hesitate to contact us at firstname.lastname@example.org.