Docker deploy of anycable timing out

I am trying to deploy anycable-go. My Dockerfile consists solely of

FROM anycable/anycable-go:latest

It boots up fine (see below), but it seems like Render never recognizes that it’s booted. I have tried this both with and without a health check path specified.

Mar 5 07:01:06 PM  I 2021-03-06T03:01:06.491Z context=main Starting AnyCable 1.0.4-c941000 (pid: 1, open file limit: 1048576)
Mar 5 07:01:06 PM  I 2021-03-06T03:01:06.491Z context=main Handle WebSocket connections at http://localhost:8080/cable
Mar 5 07:01:06 PM  I 2021-03-06T03:01:06.491Z context=main Handle health connections at http://localhost:8080/health
Mar 5 07:01:06 PM  I 2021-03-06T03:01:06.493Z context=rpc RPC controller initialized: anycable-rpc:10000 (concurrency: 28, proto_versions: v0,v1)
Mar 5 07:01:06 PM  I 2021-03-06T03:01:06.513Z context=pubsub Subscribed to Redis channel: __anycable__

Here are the deployment docs: AnyCable Docs. Docker build works locally as well. My best guess at why render is unable to detect that it’s booted is that it doesn’t respond to requests to /, only to /health and /cable

I’m also getting something similar on srv-c11fh9rjbvmd4sfm42c0, which is an RPC server:

Mar 5 07:39:38 PM  I, [2021-03-06T03:39:38.529470 #55]  INFO -- : RPC server is starting...
Mar 5 07:39:38 PM  I, [2021-03-06T03:39:38.533412 #55]  INFO -- : RPC server is listening on 127.0.0.1:10000

Since this is a private service (like redis is), it seems especially weird that Render is unable to detect a successful build. Any ideas what’s going on or hacks to fix this?

Any update on this? This is blocking deploying some pretty key upgrades.

I don’t think there’s anything particularly unique about these services.

Hi Kai,

It looks like these services are listening on localhost. Perhaps listening on 0.0.0.0 will fix things.

Ah, that makes sense. I’ll give that a try!

Thanks for the help.

1 Like

Hi kai. Would you mind sharing your solution? How did you set it to 0.0.0.0 and how did you get Rails to connect to it?

I just started looking into AnyCable and while it looks promising, setting it up is proving to be quite daunting.

Hi marc,

I have three services:

  • main rails app
  • anycable-ws
  • anycable-rpc started with bundle exec anycable --rpc-host 0.0.0.0:50051

On anycable-ws I then set the following environment variables, which seemed to do the trick
ANYCABLE_HOST = 0.0.0.0
ANYCABLE_RPC_HOST = anycable-rpc:50051
REDIS_URL = the redis url

Beyond that, I just followed the anycable instructions for configuring the rails app. Performance so far has been excellent, with big memory improvements on the main rails app.

1 Like

Awesome. Thanks so much for sharing this. I’ll give it a try :raised_hands: