0

I have a server running Rails and Tomcat applications with Apache. I currently have a rails app setup to port 80 and a tomcat application on port 8080. I'm attempting to have Apache forward all requests on /uploader to tomcat. The tomcat application works OK when visiting it's own url, but when using the redirect it takes ~60 seconds per request. Here is my httpd file. Any help is really appreciated! Thanks!

<VirtualHost *:80> ServerName http://example.com/ DocumentRoot /Users/lab/WebApplications/app/public PassengerSpawnMethod conservative # Speeds up spawn time tremendously -- if your app is compatible. # RMagick seems to be incompatible with smart spawning RailsSpawnMethod smart # Keep the application instances alive longer. Default is 300 (seconds) PassengerPoolIdleTime 1000 # Keep the spawners alive, which speeds up spawning a new Application # listener after a period of inactivity at the expense of memory. RailsAppSpawnerIdleTime 0 # Just in case you're leaking memory, restart a listener # after processing 5000 requests PassengerMaxRequests 5000 # PassengerMaxPoolSize 4 # PassengerMaxInstancesPerApp 4 <Directory /Users/lab/WebApplications/app/public> AllowOverride all Allow from all Options -MultiViews </Directory> </VirtualHost> ProxyRequests On ProxyVia On SetEnv force-proxy-request-1.0 1 SetEnv proxy-nokeepalive 1 # Redirect to tomcat ProxyPass /uploader http://localhost:8080/FileSplit ProxyPassReverse /uploader http://localhost:8080/FileSplit 
3
  • You might capture some traffic with tcpdump to see which side is sitting on the request for 60 seconds. Commented Feb 24, 2012 at 19:31
  • It's tenuous, but does changing the localhost to 127.0.0.1 make any difference? Commented Feb 24, 2012 at 20:16
  • 1
    you want ProxyRequests Off as that is for enabling forwarding proxying rather than (what you need) reverse proxy with ProxyPass Commented May 14, 2012 at 18:13

1 Answer 1

0

Just a guess, but apache is probably waiting for your app to timeout before you get to the ProxyPass. Try moving this to the top of the file, and see if that makes a difference.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.