Facing an Error "Instance is unhealthy" - Python App

After some attempts I could built my python app with success, However I am currently facing a new challenge. After approximately 10-20 seconds of my bot functioning, I encounter an “Instance is unhealthy” error which abruptly disconnects the connection. I am seeking advice on how to address this issue.
Any guidance you can provide would be greatly appreciated. Thank you.

Hey!

Koyeb runs health checks on your app if you declared a port it is expected to server traffic on. That port is 8000 in your case and it seems that your app does not answer to the health checks that the platform sends its way.

If your app does not need to open port 8000, you can transform your service into a Worker kind. To achieve that, go to your service settings and change the service type to Worker instead of web service.
You will need to upgrade your plan, but you will still have access to the Free Instance, at no cost.

1 Like

:scream: I wrote too fast! The free Instance cannot be used to deploy Workers.

A workaround if you want to keep using the free instance: implement a small in-app http server to answer health checks.

1 Like

thanks for the help, that’s what I was looking for, I resolved the issue.