Slowness on PUT requests

I’ve been noticing about a 2 second pause between PUT requests when
running either webrick or mongrel. GET, LIST and DELETE all work
great. I tested this by using curl to make a lot of continuous requests.

Even if I remove everything from the controller method and just
replace it with render(:nothing => true) I still get the lag. So I
don’t think it’s database overhead.

My theory is that Webrick/Mongrel are translating the PUT body as a
POST body (I noticed that some of the put body is coming through in
params[]). And fastcgi is doing a quicker job of it, or something.
But that still doesn’t quite sound right cause I’m pretty sure CGI
translates the body in both cases.

Anyone have any thoughts?
-Mat

On Fri, 2006-07-28 at 13:21 -0400, Mat S. wrote:

params[]). And fastcgi is doing a quicker job of it, or something.
But that still doesn’t quite sound right cause I’m pretty sure CGI
translates the body in both cases.

Hey Mat, if you’ve got the curl commands you use I’ll investigate it.


Zed A. Shaw


http://mongrel.rubyforge.org/
http://www.railsmachine.com/ – Need Mongrel support?

On Jul 28, 2006, at 1:52 PM, Zed S. wrote:

My theory is that Webrick/Mongrel are translating the PUT body as a
POST body (I noticed that some of the put body is coming through in
params[]). And fastcgi is doing a quicker job of it, or something.
But that still doesn’t quite sound right cause I’m pretty sure CGI
translates the body in both cases.

Hey Mat, if you’ve got the curl commands you use I’ll investigate it.

Yeah, do put a file from CLI curl it’s just:

curl -T

So my usual command is something like:

curl -T test_file http://localhost:3000/data/test_file

I have a route that maps ‘data/:file’ to my DataController’s index
method. If you just do the PUTs in a for loop you should see the
slowness. If you can’t see it with test code, let me know and maybe
I can just send you the server I have.

Thanks for the help,
Mat

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs