Mika H.
Mika H.

Reputation: 4329

Rails set timer on server request

I have a Rails project in which the user can submit a request through a form. If the request takes too long for the server to process (say, more than 30 seconds), I would like the server to terminate and return to the user "Sorry, it's taking too long for the server to process your request." Is it possible to do that?

Upvotes: 0

Views: 335

Answers (1)

Gavin Miller
Gavin Miller

Reputation: 43815

The rack-timeout gem does just that.

Upvotes: 1

Related Questions