Request Resubmitted

I am using Ruby 1.8.6 and Rails 1.2.6. The application is deployed to Apache 2.2 using mod_proxy_balancer to a cluster of Mongrel 1.1 servers.

I have been struggling with a problem that only manifests on the production server. If a request takes longer than 60 seconds, then the request is being resubmitted. I have used snoop on the Solaris server to see the HTTP headers, and there is no XHR header. So, it appears that it is not an AJAX request. I can run snoop on the client side and see the resubmitted request. So, it appears that the resubmit is happening from the browser.

I created an action that just sleeps for 90 seconds, and am able to reproduce the problem.

Can anybody think of any reason why this might be happening? Or, do you have any debugging suggestions? Unfortunately, the production server is remote so I have to interface using Telnet. I cannot reproduce the problem on my development machine which is Windows XP using InstantRails.

I know that long running processes should be pushed off of Rails. However, I inherited the app and am stuck with the current design until it can be re-engineered in the next few months.

Thanks.

I am using Ruby 1.8.6 and Rails 1.2.6. The application is deployed to Apache 2.2 using mod_proxy_balancer to a cluster of Mongrel 1.1 servers.

I have been struggling with a problem that only manifests on the production server. If a request takes longer than 60 seconds, then the request is being resubmitted. I have used snoop on the Solaris server to see the HTTP headers, and there is no XHR header. So, it appears that it is not an AJAX request. I can run snoop on the client side and see the resubmitted request. So, it appears that the resubmit is happening from the browser.

I have a similar issue, but it is nginx rather than Apache.

If a request has an error or times out, it is submitted to another mongrel. We've tried to adjust the nginx config so that certain URLs that are admin functions (that often take 2-3 minutes) are not subject to timeouts.

Perhaps that's the crux of your problem, too?

(it happens to be a Rails 1.2.2 app, but it's really nginx's behavior that is the problem)

I created an action that just sleeps for 90 seconds, and am able to reproduce the problem.

Can anybody think of any reason why this might be happening? Or, do you have any debugging suggestions? Unfortunately, the production server is remote so I have to interface using Telnet. I cannot reproduce the problem on my development machine which is Windows XP using InstantRails.

I know that long running processes should be pushed off of Rails. However, I inherited the app and am stuck with the current design until it can be re-engineered in the next few months.

Thanks.

You're welcome, -Rob

Rob Biedenharn http://agileconsultingllc.com Rob@AgileConsultingLLC.com