Follow up to an old problem, finally solved, in case anyone else<br>stumbles across the same problem.<br><br>&gt; I have a problem with a storage web service our group wrote using<br>&gt; <span class="nfakPe">Mongrel</span>::HttpHandler We have a consistent problem when using<br>
&gt; http PUT to this service when the data is larger than about 4 GB.<br><br>Well, it turns out I could only repeat it consistently between two<br>particular systems.&nbsp; There was some back and forth on this<br>list, and I threw out the red herring that the http11_parser.c code<br>
used an unsigned int for the content size.&nbsp;&nbsp; Zed pointed out that <br>particular variable was just dead code:<br><br>&gt; Instead you have this line in http_request.rb:<br>
&gt; <br>&gt; content_length = @params[Const::CONTENT_LENGTH].to_i<br><div id="1hcp" class="ArwC7c ckChnd">
&gt;<br>&gt; Now, that means it relies on Ruby&#39;s base integer type to store the<br>
&gt; content length:<br><br>Since @params[Const:CONTENT_LENGTH] is a string,&nbsp; ruby&#39;s<br>to_i method can get it right,&nbsp; casting to a fixnum internally when <br>necessary - integer overflow was not the issue.<br></div>
<br><br>On Tue, Jun 3, 2008 at 8:30 PM, Michael D&#39;Auria<br>
&lt;<a href="mailto:michael.dauria@gmail.com">michael.dauria@gmail.com</a>&gt; wrote:<br>
&gt; Randy,<br>
&gt; Are you sure this is an issue with the size of the input and not the amount<br>
&gt; of time that the connection is left open?<br>
&gt; Michael<br><br>That turns out to be the correct answer, though I eliminated it (incorrectly)<br>by using curl&#39;s limit-bandwidth option to get times greater than that<br>exhibited by my 4GB transfers - those all worked.<br>
<br>What was causing the problem was the lag between the end of the <br>upload/request from the client, to the time when the server finally <br>sent a response after processing the request (the processing time was <br>entirely taken up with copying the upload as a temporary mongrel <br>
file to its permanent disk file location).<br><br>Still,&nbsp; using tcpdump showed that the response was making it back <br>to the client from the server intact and correctly.<br><br>What was timing out was the firewall on the client system, which <br>
was using statefull packet filtering (iptables on an oldish redhat <br>system).&nbsp;&nbsp; The dead time in the http request/response had <br>exceeded the time to live for the state tables.&nbsp; Turning off the <br>keep-state&nbsp; flag in the firewall rules allowed the transfer to<br>
complete.&nbsp; Now it&#39;s just a matter of tweaking the parameters so <br>we can get keep-state working again.<br><br>Thanks for all the help on this.<br><br>-Randy Fischer<br>