zombocom/rack-timeout

Some requests have an uncontroller timeout time

majioa opened this issue · 1 comments

I have the following setup in rails config

Rails.application.config.middleware.insert_before Rack::Runtime, Rack::Timeout, service_timeout: 240, wait_timeout: 240, wait_overtime: 240

But in log for some requests the timeout is 15 ms, but why that time is setup for the some requests only? those requests make faults to my server....

I, [2020-03-28T08:21:24.598269 #787628]  INFO -- : [29a48c5a-a1b2-4914-9e84-473b12e294e2] Sent mail to 3aHyga@gmail.com (8.2ms)
F, [2020-03-28T08:21:24.599299 #787628] FATAL -- : [29a48c5a-
a1b2-4914-9e84-473b12e294e2]
F, [2020-03-28T08:21:24.599346 #787628] FATAL -- : [29a48c5a-a1b2-4914-9e84-473b12e294e2] Rack::Timeout::RequestTimeoutException (Request ran for longer than 15000ms):
F, [2020-03-28T08:21:24.599377 #787628] FATAL -- : [29a48c5a-a1b2-4914-9e84-473b12e294e2]
F, [2020-03-28T08:21:24.599423 #787628] FATAL -- : [29a48c5a-a1b2-4914-9e84-473b12e294e2] app/controllers/application_controller.rb:60:in `redirect_to_slug_if_name'
I, [2020-03-28T08:21:24.599633 #787628]  INFO -- : source=rack-timeout id=9ba8186d-998d-411a-9298-43d9c6c27045 timeout=15000ms service=15058ms state=completed
I, [2020-03-28T08:21:24.599705 #787628]  INFO -- : source=rack-timeout id=9ba8186d-998d-411a-9298-43d9c6c27045 timeout=15000ms service=15058ms state=completed
I, [2020-03-28T08:21:54.624311 #787628]  INFO -- : source=rack-timeout id=04629ae7-1462-42cb-b886-ea05f5ecb4d5 timeout=240000ms state=ready
I, [2020-03-28T08:21:54.624660 #787628]  INFO -- : source=rack-timeout id=04629ae7-1462-42cb-b886-ea05f5ecb4d5 timeout=15000ms service=0ms state=ready
I, [2020-03-28T08:21:55.916763 #787628]  INFO -- : source=rack-timeout id=c4a3499c-6980-4555-90ca-ef772be19622 timeout=240000ms state=ready
I, [2020-03-28T08:21:55.916946 #787628]  INFO -- : source=rack-timeout id=c4a3499c-6980-4555-90ca-ef772be19622 timeout=15000ms state=ready

I suspect you have the middleware inserted twice. Try using rake middleware to debug.

I'm closing as this isn't a bug report, but I don't mind if you want to continue to converse about debugging, but generally would prefer if debugging is done on something like Stack Overflow where more people are likely to jump in to help you.