Python bottle server loads and runs but fails health check

I wrote a very simple python bottle application, which responds to a POST with the data for the given user token. It runs perfectly locally, but when I deploy it as an app, it builds fine, and starts running:

[2021-09-26 19:23:50] Bottle v0.12.19 server starting up (using WSGIRefServer())... [2021-09-26 19:23:50] Listening on http://localhost:6161/ [2021-09-26 19:23:50] Hit Ctrl-C to quit.

But then hangs and fails the health check. I’ve written similar apps/components that run fine opening up listening for a websocket connection. Is there any reason why this wouldn’t work? The runtime logs tab says nothing and the Health Check only says that ’ App is running slower than expected’ is a common cause. Is there any way for me to get more info about why the Health Check fails?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hey @Kiva,

From those logs it looks like your app is bound to localhost. This unfortunately won’t work in app platform. I’d recommend updating your app to listen on interface and try running that again. Running on localhost will cause the app to fail health checks.

Hope it helps! Nate