Cannot run rails console

I just deployed my rails app with the fly launch & fly deploy commands. I wanted to know whether my app has been seeded in production while deploying or whether it needs to be done manually. So, I ran this command:

fly ssh console --pty -C '/rails/bin/rails console'

But get the following output:

Connecting to fdaa:1:17xxxxxxxxxx2287:2... complete
Error: ssh shell: wait: remote command exited without exit status or exit signal

After the connection has been completed, It waits for around 10 seconds to get some response but eventually, it times out and returns Error: ssh shell: wait: error.

I tried these commands too:

flyctl ssh console -C '/rails/bin/rails console' 
fly ssh console --pty -C '/rails/bin/rails console'

but I get similar error messages.

What could be the solution?

These without exit status messages often turn out to be OOM.

(The 10 seconds is typically it running initially before exhausting RAM and then exhausting swap.)

Do you see any Out of memory entries in fly logs?


Thanks for the quick reply @mayailurus!

I cannot visit my dashboard as it gives me a 500 error message… This is happening since last couple of hours. I don’t know why. And I have a strong feeling that this is showing personally to me. I tried to delete the cookie to sign back in but it’s the same result.

I guess it’s because I have re-created my app & database a couple of times and that’s why for security reasons it’s not letting me use the site. Yet, I was still able to deploy my app.

And as you mentioned, my app would possibly run out of memory, well that could be the case. I have encountered that issue a couple of times earlier but at that time I did receive an email informing me that my app has ran out of memory. Yet, I have not received such an email in this period of time.

Hello, if this helps I’m getting the same error 500 from the dashboard, which I can no longer access, but my applications still seem to be online

1 Like

Oh! That’s a bummer! Same here, the application works perfectly fine and deploys too. But not able to interact with it through the command line.

I’ve added more docs here: Existing Rails Apps · Fly Docs

I saw the 500 error too, but it went away for me - first after I switched browsers, and then it was still gone even after I switched back.

You should also be able to see your logs using fly logs.


Yes, you’re right! I am now able to access it! :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.