Mongrel+Apache 2.2 Proxy

Hi,

I’m running a rails (mongrel) based web service behind an apache proxy,
on windows 2003.
Sometimes I see a POST in the apache log that returned a 404 but nothing
about it in the rails log.
It doesn’t happen every time, 9 out of 10 times it works just fine.

The post (is actually a put) comes from a .NET application uploading a
small xml-file.

The log message in apache looks like this

[21/Nov/2007:15:56:15 +0100] “POST /archivefiles/173688 HTTP/1.1” 404 -

… and the vhost

<VirtualHost *:8080>
#Fix for Apache bug 39499
SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1

XSendFile on
XSendFileAllowAbove on

RewriteEngine On

# Check for maintenance file. Let apache load it if it exists
RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
RewriteRule . /system/maintenance.html [L]

# Let apache serve static files
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f
RewriteRule (.*) $1 [L]

# Don't do forward proxying
ProxyRequests Off

# Enable reverse proxying
<Proxy *>
    Order deny,allow
    Allow from all
</Proxy>

# Pass other requests to mongrel instance
ProxyPass / http://localhost:4003/
ProxyPassReverse / http://localhost:4003/

<Directory C:/rails>
    AllowOverride All
    Options FollowSymLinks
    Order allow,deny
    Allow from all
</Directory>

Has anybody seen this and know what’s wrong and/or a way around it?

Regards,

Sebastian

we had a lot of issues with apache 2.2 mod_proxy and mongrels… just
could
not make it work. finally we moved to nginx as the webserver and it
works
really well.

what kind of problems did you have?

and since when is there a windows version of nginx?


ralf

Am 23.11.2007 um 18:17 schrieb A. Peter Relan:

sorry… not windows: we did it on linux.

the main problems we saw were a. proxy errors from upstream server and
b.
round robin load balancing was not very smart by mod_proxy; it queues up
requests to busy mongrels even if other mongrels are idle…

and at high load we would see over 200 apache daemons waiting around for
our
mongrels to finish, which at several megs per apache daemon would
consume
all our memory.

we had a choice of lighttpd or nginx… we took nginx and are very happy
with
it. i’ve also heard good things about lighttpd (if that’s available on
windows)