Problem posting multipart form data using Apache with mod_proxy to a mongrel instance

Posted by Ryan E on Server Fault See other posts from Server Fault or by Ryan E
Published on 2009-09-22T16:11:47Z Indexed on 2012/04/15 11:34 UTC
Read the original article Hit count: 413

Filed under:
|
|

I am attempting to simulate my site's production environment as closely as I can on my local machine. This is a rails site that uses Apache w/ mod_proxy to forward requests to a mongrel cluster. On my Mac OSX Leopard machine, I have the default install of apache running and have configured a vhost to use mod_proxy to to forward requests to a local running mongrel instance on port 3000.

<Proxy balancer://mongrel_cluster-development>
BalancerMember http://127.0.0.1:3000
</Proxy>

For the most part, this is working fine. I can browse my development site using the ServerName of the vhost I configured and can confirm that requests are being properly forwarded to the mongrel instance. However, there is a page on the site that has a multipart form that is used to upload an image to the server. When I post this form, there is a delay of about 5 minutes and the browser ultimately returns a

Bad Request
Your browser sent a request that this server could not understand.

In the error log for my vhost:

[Tue Sep 22 09:47:57 2009] [error] (70007)The timeout specified has expired: proxy: prefetch request body failed to 127.0.0.1:3000 (127.0.0.1) from ::1 ()

This same form works fine if I browse directly to the mongrel instance (http://127.0.0.1:3000). Anybody have any idea what the problem might be and how to fix it? If there is any important information that I neglected to include, post a comment, and I can add to this question.

Note: Upon further investigation, this appears to be a problem specific to Safari. The form works fine in Firefox.

© Server Fault or respective owner

Related posts about apache2

Related posts about mod-proxy