dolarsrg
(Santiago Ruiz)
May 2, 2023, 1:13pm
1
INFORMATION
Relevant information to this issue:
OS: 5.4.238-148.347.amzn2.x86_64
Programming language and version: Ruby 3.2.2 + Rails 7.0.4.3
ISSUE
Hello!
I’m having a problem launching rails console with qovery shell.
I connect to the instance with:
% qovery shell
Then I try to launch rails console:
# rails c
ERRO[2023-05-02T14:10:19+02:00] connection closed by server: websocket: close 1011 (internal server error): EOF from upstream for stdout
And I am returned to my operating system prompt and kicked out of the connection to the instance.
Could it be that I am missing something to install in my Docker image? My DockerFile looks like this:
FROM ruby:3.2.2
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -
RUN apt-get update -qq && apt-get install -y build-essential libvips nodejs && npm install -g yarn
RUN mkdir /app
WORKDIR /app
COPY Gemfile Gemfile.lock ./
RUN gem install bundler
RUN bundle install
COPY . .
RUN ls -la
RUN rake assets:precompile
EXPOSE 3000
CMD [“rails”, “server”, “-b”, “0.0.0.0”]
Any idea what might be going on? I am migrating from Heroku and on Heroku and local the console seems to work without problems.
Thanks in advance and best regards!
1 Like
Hi @dolarsrg - I’ll ask someone from the Qovery engineering team to investigate your issue.
1 Like
bchastanier
(Benjamin Chastanier)
May 2, 2023, 1:39pm
3
Hey @dolarsrg ,
I will have a look, do you mind sharing your app console link please?
Thanks
1 Like
dolarsrg
(Santiago Ruiz)
May 2, 2023, 1:41pm
4
2 Likes
bchastanier
(Benjamin Chastanier)
May 2, 2023, 3:51pm
5
Hi @dolarsrg ,
Sorry for the late reply.
So it seems your application pod is crashing (OOM) when applying rails c
command.
Shell is hence closed (that’s what you saw).
You can have a look to your app console, on the dashboard, there is a “service stability”, with a count to 7, meaning your application got restarted 7 times (OOM).
You should be able to overcome this issue increasing your app memory (from 512m to 1Go) for example in a first iteration and redeploy your app.
Then you go test back to use rails shell. If you get kicked out and restarts counter increased, then it needs to be increased again.
On a side note, I am not sure you were using Qovery CLI last version, I just fixed a bug on the shell sub command regarding new console URL.
You can upgrade your Qovery CLI version via:
qovery upgrade
Let me know if it helps
2 Likes
dolarsrg
(Santiago Ruiz)
May 3, 2023, 8:30am
6
Hi @bchastanier ,
awesome! Now is working like a charm.
I’m using Qovery 0.58.8, seems to be the last version available at Homebrew. Should I update without using that package manager?
% qovery upgrade
Error: Upgrade cancelled: no write permission on the Qovery CLI binary file: /opt/homebrew/bin/qovery
By the way, could I have discovered the OOM error in the console logs? I have been checking them and have not been able to find it.
Best regards!
bchastanier
(Benjamin Chastanier)
May 3, 2023, 8:49am
7
Hi @dolarsrg ,
You can use brew to upgrade it indeed if you want.
It’s not so easy to spot from the logs but you can actually, not sure it’s the proper example from the screenshot, but the important part is that you will see some new pods kicking-in and old ones not sending any logs any longer.
I circle it back with the team to see how restarts / stability information can be better displayed.
Stay tuned
dolarsrg
(Santiago Ruiz)
May 3, 2023, 9:49am
8
Thanks a million @bchastanier , you have been very helpful. Have a great day!
2 Likes
system
(system)
Closed
May 18, 2023, 12:54pm
10
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.