1,233 questions
0
votes
0
answers
74
views
Nginx redirects to 0
I am deploying a Rails 7 app on an EC2 instance that currently has an IP address of xyz.abc.def.ghi. I had been using Nginx and Passenger on previous deploys, but it seems that Passenger relies on now ...
0
votes
1
answer
147
views
Basic Puma server doesn't do anything
I'm trying to set up a Puma server, and I can't even get out of the starting gate. Below is supposed to be a bare-bones does-nothing-but-respond server. It's supposed to run the server until I stop it ...
0
votes
1
answer
71
views
Puma starts processing a request 8-10 seconds after ALB has forwarded it
I have a regular Ruby on Rails application with Puma server running with the configuration -w 1 -t 1:1 (i.e. one worker and one thread). This is deployed on an EC2 instance, fronted by an AWS ALB. ...
-3
votes
1
answer
64
views
Where is config/puma.rb?
I've been reading documentation on configuring Puma. The docs frequently refer to config/puma.rb. I don't understand where that file is or should be. Is it relative to the current directory when I ...
0
votes
1
answer
245
views
"This connection is in use by Fiber" error after upgrade to rails 7.2 and ruby 3.2.2
We meet error after app upgrade to rails 7.2 and ruby 3.2.2.
ActiveRecord::StatementInvalid Mysql2::Error: This connection is in use by: #<Fiber:0x00007fad145210e8 (resumed)>
It is occurred in ...
1
vote
1
answer
227
views
Docker Rails works on dev but not on staging
My development environment is working successfully which consists of Ubuntu LTS 22.04, Docker, Rails 7.1, and Puma v6.4.2
My staging server environment is not working. This environment is using Ubuntu ...
0
votes
1
answer
281
views
Puma caught this error: Invalid option key: urlsafe_csrf_tokens= (RuntimeError)
I just upgraded my Rails 6.1.7.7 app to 7.1.3.2. My puma version is 6.4.2. Now when I try to load the app in the browser (http://localhost:3000) I get this message
Puma caught this error: Invalid ...
1
vote
1
answer
134
views
Puma not creating pid file. Connection Refused error by Nginx on puma configuration
Puma socket does not exist under sockets folder yet puma is running under systemd service
tail -n10 /var/log/nginx/access.log
172.69.171.135 - - [15/Apr/2024:08:30:00 +0000] "GET / HTTP/1.1" ...
0
votes
1
answer
617
views
Rails production, trilogy can't connect to remote db but mysql2 can
Trying to switch our production Rails 7.1.3 server from mysql2 to trilogy to connect to two dbs:
our remote mysql db at DB_IP_ADDR on a separate DO droplet
our local solid_cache mysql db on our ...
0
votes
2
answers
90
views
What in exifr causes this Tempfile to get closed?
In this piece of Ruby code that processes an UploadedFile using exifr
f = uploaded_file.tempfile
p "1 #{f.closed?} #{f.instance_variable_get(:'@unlinked')}"
#1 EXIFR::JPEG.new(StringIO.new(f....
0
votes
0
answers
148
views
Sidekiq performance issues. Htop shows multiple sidekiq processes
I'm having some performance issues with sidekiq in my production server.
My server has 2 cores, and I have sidekiq configured with concurrency 8 but should be only one sidekiq process, that means that ...
0
votes
0
answers
65
views
better rails development server
The rails application I work on makes many 3rd party requests to get data. This often makes the development server slow because those requests takes a while to resolve and they block the other ...
1
vote
0
answers
103
views
undefined method `then' for #<Array:0x000XXXXX> when starting rails server
When I'm starting Rails Server to run my app, I get this error on the browser and terminal,
Yesterday It was working fine but suddenly getting this issue,
Puma caught this error: undefined method `...
0
votes
0
answers
606
views
bin/dev doesn't load puma.rb
New Rails 7 application with css-bundling and bootstrap.
Now supposed to run bin/dev for dev server, using puma
It does not load my config/puma.rb
I commented out the line for the port in bin/dev, and ...
1
vote
1
answer
463
views
Rails 7 Action Cable with Puma, Nginx, Docker Swarm
I setup a DigitalOcean Ubuntu 22 droplet to host a docker swarm with containers for a rails app, postgress, and redis. I’m not able to get action cable to work with puma and nginx. I see errors in the ...
2
votes
1
answer
228
views
How to keep the Ruby on Rails default information page?
I'm looking for a way to keep the Ruby on Rails "default information page." In Rails 7, it is the page that shows the Rails logo in the center and the version numbers on the bottom for Ruby, ...
1
vote
1
answer
460
views
Puma workers not booting in Rails 5.2 on Ubuntu 20.04 VM
I was learning to deploy a demo rails app using Capistrano, with Puma as an app server and Nginx web server accordingly. I've set up the necessary puma configurations in a file, _stage.rb, and later ...
0
votes
1
answer
578
views
nginx not connecting to puma upstream
I've setup a puma server for a rails app and an nginx upstream directive but it's not routing correctly.
I'm on Ubunutu 22.10
root@kapelner-gradesly:~/deploy/gradeportal/current# lsb_release -a
No LSB ...
0
votes
1
answer
170
views
nio4r terminates with unsupported backend (ArgumentError) with Puma
I used bundle update to update my gemfile's development support and test gems, as all the production gems are version locked. After the update, nio4r remained at 2.5.2 as it had been locked. However, ...
4
votes
0
answers
588
views
ActionCable websocket connection closed after 3 minutes
In both development and production environment, I notice that the websocket connection was getting closed every 3 minutes (exactly between 2.95 and 2.98 minutes each time, it seems).
The channel:
...
1
vote
0
answers
493
views
Capistrano deployment stop suddenly at 'puma:restart' stage
I'm trying to deploy a ruby on rails app on AWS instance using Capistrano. I followed these three tutorial mostly How to deploy your rails app to Amazon EC2 using Capistrano, nginx and puma, Deploying ...
0
votes
1
answer
380
views
ruby 3.1.4 puma 5.6 prune_bundler loops with Early termination of worker
After upgrade to ruby 3.1.4 puma didn't start but loops with
+ Gemfile in context: .../releases/20230405083245/Gemfile
! Unable to start worker
.../shared/bundle/ruby/3.1.0/gems/bundler-2.3.26/lib/...
0
votes
0
answers
2k
views
How to fix a Client-side desync vulnerability in a Rails app
I received a burp scan result from my Rails app (hosted on heroku) that indicates that server is vulnerable to client-side desync attacks. The scan report reads as follows;
The server appears to be ...
0
votes
1
answer
162
views
ERR_TOO_MANY_REDIRECTS Rails + Puma + Nginx (Dockerized)
I'm running a dockerized rails app with puma and nginx, however, I'm getting ERR_TOO_MANY_REDIRECTS when trying to access the application from a browser.
I have config.force_ssl = true on my ...
1
vote
0
answers
152
views
WARNING hook before_worker_boot failed with exception (Redis::CannotConnectError) getaddrinfo_a: System error
I keep getting this error while trying to start rails in docker.
2023-02-15 13:42:52 [54] WARNING hook before_worker_boot failed with exception (Redis::CannotConnectError) getaddrinfo_a: System error
...