rack-timeout | Abort requests | Frontend Framework library
kandi X-RAY | rack-timeout Summary
kandi X-RAY | rack-timeout Summary
Abort requests that are taking too long; an exception is raised. A timeout of 15s is the default. It’s recommended to set the timeout as low as realistically viable for your application. You can modify this by setting the RACK_TIMEOUT_SERVICE_TIMEOUT environment variable. There’s a handful of other settings, read on for details. Rack::Timeout is not a solution to the problem of long-running requests, it’s a debug and remediation tool. App developers should track rack-timeout’s data and address recurring instances of particular timeouts, for example by refactoring code so it runs faster or offsetting lengthy work to happen asynchronously.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Initializes the request object
- Configure the value of a property .
rack-timeout Key Features
rack-timeout Examples and Code Snippets
Community Discussions
Trending Discussions on rack-timeout
QUESTION
I ran bundle update rails
and got this. I'm stumped. If activerecord-session_store
2.0 depends on a version of actionpack
between 5.2.4.1 and above, and if actionpack is a dependency of Rails 6, shouldn't this be ok?
ANSWER
Answered 2021-Jun-14 at 23:35Hmm; if I try bundle install
with your Gemfile
I get
QUESTION
I'm trying to upgrade my Ruby on Rails application to Ruby 3.0.1. I'm getting an error when the server is starting on Render.com. I'm also getting the same error when running specs on my local machine
error on render.com ...ANSWER
Answered 2021-Apr-10 at 19:49So... It seems this line in ActiveSupport v6.0.3.6
is calling this method in redis with 3 arguments instead of 2; exactly like the error says!
And just as I suspected, that's already been fixed in the master branch. Here was the commit that introduced the fix.
So in other words, I reckon you've found a bug in rails 6.0 working with ruby 3.0.
Additionally, it seems that this bug has already been backported into the 6.0-stable
branch and, according to the comments, "will be included in Rails 6.0.4
".
tl;dr: Either downgrade ruby back to 2.7
, or upgrade rails to 6.1
, or add to your Gemfile
:
QUESTION
SOLUTION: I was running ruby 2.6.6p146 with Bundler version 2.2.4. As per @thiebo's suggestion, I downgraded to Bundler 2.1.2 and it worked! Steps:
- $ gem uninstall bundler
- [then delete Gemfile.lock]
- $ gem install bundler --version '2.1.2'
I've tried these options, but nothing has worked: heroku push error: "Could not detect rake tasks"
I can indeed run bundle exec rake -P against my app
I tried rescuing the Rakefile, and putting rspec into production in my Gemfile: Heroku could not detect rake tasks (LoadError: cannot load such file -- rspec/core/rake_task)
I added 'rake' to the gemfile.
Tried adding gem 'rack-timeout': Heroku 'Could not detect rake tasks'
I also followed this thread to no avail: https://github.com/rubygems/bundler/issues/3640
Here's the error:
...ANSWER
Answered 2021-Jan-06 at 23:57QUESTION
I'm trying to deploy my Rails 5.0 on heroku after a bundle update. I'm blocked by an issue on assets:precompile
...ANSWER
Answered 2020-Jun-30 at 09:08Thanks to @Les Nightingill, I found the issue.
It was not directly linked to assets generation, but the probleme was indicated at the first error line in the logs :
QUESTION
In our Rails application we are using rack-timeout 0.4.2 and have it configured in config/initializers/timeout.rb
for prod and staging like so:
ANSWER
Answered 2020-Jun-26 at 22:22I assume you're talking about https://github.com/sharpstone/rack-timeout.
0.4.2 allows reading the value using some backwards-compatible methods:
QUESTION
I want to remove ActionCable from my Rails app, and I found this which says to replace gem rails
in the Gemfile with all of rails
component gems minus gem 'action_cable'
. I did this and I manually removed action cable from gemfile.lock
ANSWER
Answered 2020-Apr-27 at 00:32First thing, if you remove the gem from your gemfile, and run bundle install
, it will install only gems from your gemfile and should have updated gemfile.lock
, but it will not uninstall gem from your system.
But you have to remove the gem from the system by calling gem install
.
QUESTION
This is on Heroku, but as of now I don't think it is related to that specifically. We also use rack-timeout gem which should be killing processes after 30 seconds. Please see below why it looks like that is not happening in some cases.
We have a very huge pool of puma workers/threads, 5 workers and 20 threads per worker. At the time of this issue as mentioned, we had 5 heroku dynos running, so this would have been 500 total puma instances available for working requests. With this many, I find it very hard to believe that a few long running requests caused such a high number of 503s.
I set up puma metrics and added them to a custom logging thread, and here is an example of a snapshot where we had an uptick in 503s from this AM, where the puma backlog results are bizarre:
...ANSWER
Answered 2019-Nov-23 at 08:56After speaking with a few folks, it turns out that this was a bug in puma that was fixed in version 3.12 (We were on 3.11 when this question was first written). After we upgraded to 4.2 I can confirm that it works as expected.
QUESTION
I'm trying to push a forked repo to Heroku but Heroku won't accept the push because Ruby 2.3.1 wasn't accepted. I changed the version to 2.3.3 in the Gemfile and running bundle install --without production
, but oddly enough it was still considered to be 2.3.1. The same things happened even after trying other Ruby versions, such as 2.4.0.
Reference:
...ANSWER
Answered 2019-Mar-22 at 11:35Heroku doesn't support Ruby 2.3.1, 2.3.3 or 2.4.0
Look at your log:
QUESTION
What I thought was an issue with a rack-timeout setting is actually an issue with ActiveRecord::Base.transaction
When a request hits one of our update endpoints and that update is handled in a transaction
for even something as simple as
...ANSWER
Answered 2018-Sep-07 at 13:42So I Figured this out. It was a puma worker configuration which was I believe was causing weird thread/ double connection issues.
In our config/puma.rb file we had
QUESTION
We're seeing occasional timeouts in our application that appear to trace to Redis, though I'm not entirely sure. We have a module that we include in some of our jobs to reduce duplication of heavier work:
...ANSWER
Answered 2018-Dec-16 at 23:17The API page says this:
WARNING the API exposes some operations which are not scalable and should not be used in an automated fashion or in bulk as part of your application functionality. You should not be scanning through queues/sets and deleting jobs unless something has gone wrong and you need to repair data manually.
You want this: https://github.com/mperham/sidekiq/wiki/Ent-Unique-Jobs
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install rack-timeout
On a UNIX-like operating system, using your system’s package manager is easiest. However, the packaged Ruby version may not be the newest one. There is also an installer for Windows. Managers help you to switch between multiple Ruby versions on your system. Installers can be used to install a specific or multiple Ruby versions. Please refer ruby-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page