Skip to content

Detect if the middleware is already loaded and prevent it from being loaded twice #171

Open
@dbackeus

Description

@dbackeus

We're running a Rails 6 app on Heroku with rack-timeout initialized with: config.middleware.use Rack::Timeout, service_timeout: 25, wait_timeout: 25

The errors we see in our exception tracking look legit, eg:
Rack::Timeout::RequestTimeoutError (Request waited 6ms, then ran for longer than 24994ms )

However what actually happens is that the requests timeout after pretty much exactly 15 seconds every time.

From the browsers point of view:
Screenshot 2020-12-08 at 09 51 19

From the logs:
08 Dec 2020 09:26:40.810256 <190>1 2020-12-08T08:26:40.4593+00:00 app web.1 - - E, [2020-12-08T08:26:40.459200 #153] ERROR -- : source=rack-timeout id=e14e9348-e767-4b66-82aa-8c32821a0b3b wait=6ms timeout=24994ms service=15000ms state=timed_out

(note that we have timeout=24994ms but service=15000ms)

What's going on here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions