Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 621
user1749396 Avatar asked Jan 07 '13 03:01

user1749396


1 Answers

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

like image 70
Devin Stewart Avatar answered Oct 25 '22 01:10

Devin Stewart