I’ve successfully deployed a Remix/Node.js application on Koyeb, which connects to a PostgreSQL database also hosted on Koyeb. It is a service, which contains a web page and has an API to listen to webhooks and after deployment I can correctly access the web page. However, I’m encountering a recurring issue where, consistently 5 minutes post-deployment, the application becomes unresponsive. The logs indicate:
Application exited with code 1. This usually indicates an application failure. Check that the command used to launch your application is correct.
I’m wondering if this behavior is related to the health checks. Apparently health checks are done to the port 8000, which I would expect are ok if I am able to access the web page that is deployed and right after deployment it says:
Instance is healthy. All health checks are passing.
After 5 minutes I get this logs and the app is terminated within 15 minutes:
/workspace/node_modules/pg/lib/client.js:132
const error = this._ending ? new Error('Connection terminated') : new Error('Connection terminated unexpectedly')
The deploy:
[remix-serve] http://localhost:8000 (http://10.2.1.179:8000)
In my package.json
“start”: “remix-serve ./build/index.js”,