# Request Resubmitted

**URL:** <https://www.ruby-forum.com/t/request-resubmitted/165532>\
**Category:** Rails\
**Created:** [April 14, 2009, 11:03pm UTC](https://www.ruby-forum.com/t/request-resubmitted/165532 "2009-04-14T23:03:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dave](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ee7513/32.png) [@dave](https://www.ruby-forum.com/u/dave)\
**Post date:** [April 14, 2009, 11:03pm UTC](https://www.ruby-forum.com/t/request-resubmitted/165532/1 "2009-04-14T23:03:16Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dave](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ee7513/32.png) [@dave](https://www.ruby-forum.com/u/dave)\
**Post date:** [April 15, 2009, 1:20am UTC](https://www.ruby-forum.com/t/request-resubmitted/165532/2 "2009-04-15T01:20:50Z")

</div>

On Apr 14, 2009, at 4:45 PM, Dave wrote:

> 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 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 B. [http://agileconsultingllc.com](http://agileconsultingllc.com)  
removed\_email\_address@domain.invalid
