user1749396
user1749396

Reputation: 51

how to set request timeout in rails ( thin or webrick server)

When I upload a big file to rails server, I always get a request timeout error. I don't know where to change the request timeout value.

Upvotes: 5

Views: 10612

Answers (1)

Devin Stewart
Devin Stewart

Reputation: 3036

For webrick there is a file called /usr/lib/ruby/1.9.1/webrick/config.rb.

Location may differ based on your version and install method. In that file there is a line:

:RequestTimeout => 30 that can be modified.

And in thin, thin -t 60 makes the timeout 60 seconds, the default is 30

Upvotes: 8

Related Questions