Rust actix-web 3.3.2 deployment hanging

I’m trying to deploy an actix-web 3.3.2 web app on Render, but the deployment is stuck in “In progress”, even though the console says Server running at http://127.0.0.1:8089/

I compared my app to the render actix todo example. It seems the major difference is that in the render example, actix-web 1.0.0 is used, and the main function is a vanilla sync function, whereas in the latest version, actix-web 3.3.2, the main function is typically async. See for example this actix-web example. (Edit: Actually the main function is not async. The actix_web::main macro turns main into a sync function. In any case, I still don’t understand why my Render deploy hangs like that.)

Can anyone help me get unstuck here?

(Edit: Maybe I’m setting the host and port incorrectly? For instance, I was able to get this working on Heroku, with the same repo, except I had to set the host to 0.0.0.0 and read the port from an env var.)

Could you try to bind your application to 0.0.0.0 like the example? Port should be fine since Render will automatically expose the HTTP port for your web service.

If someone comes here with similar problem for Rocket app, solution is to bind address to “0.0.0.0” for example in Rocket.toml file.

As described here:
https://api.rocket.rs/v0.3/rocket/config/

The error message might inform you that the environment name should be “release” not “production”

2 Likes