Private service, deploy failed (but keeps working fine)

Hello!

I had created a private service, which is basically a Node.JS Cron and functions, there is no web services running, etc. Then I make the deployment, seems working fine, but the icon shows as to keep running forever, and then later I receive an email saying that the deployment was failed.

I want to know why this happens, it’s because I am running a standalone Node.js script? (without a service PORT etc)

Hello Daniel!

I believe you’re right about the reason why the deployment is failing. Private services are expected to listen on a port (typically 10000). If they don’t, they’ll fail a health check and the service will be killed.

I believe you’ll want to recreate this service as a background worker rather than a private service. It would also make sense to create this service as a native cron job if you have a Cron Schedule for it to use.

Could you try recreating your service as either a Background Worker or Cron Job to see if this fixes the issue?