views:

54

answers:

1

Hi all, When Trying to upload 2GB of stream i got invalid content length error am running Apache as frontend server to mongrel and chrome as my browser. One more thing one i do it with mongrel alone am able to upload this 2 GB of stream ,cud anybody tell me whats the problem and how do i configure content length in apache??

A: 

I'd imagine the problem is that Apache considers it a denial of service attempt and has a cap to prevent you locking up all the server's resources (very reasonable), whether that's configurable or not I'm not sure - can't find anything but will keep hunting. If it's not, you can always build your own copy of Apache with the limit removed.

Have you considered sending the data in reasonable-sized chunks?

You might also wish to inspect the outgoing request using packet inspection or browser debugging tools. It's possible the content-length is being malformed by the browser (I doubt they have a 2GB test case...)

Rushyo
yaa data is being send chunk by chunk and one more thing i am doing it without apache onle with mongrel(able to upload 6 gb of stream running mongrel alone)....
AMIT
So you're not sending 2GB then? You're sending smaller chunks less than that? Streaming it is not the same as sending it in multiple parts. A 2GB streamed HTTP request is still a single request.
Rushyo
i am sending 4k at a time and when i am trying to upload 2GB FROM CHROME since it only chunke tranfer i got message upload 100% after that error comes
AMIT
The packets are being streamed through but it sounds like the actual HTTP request (that those packets form) is large. The server will likely simply not allow a request that large, regardless of how small the constituent packets were. I'd recommend uploading, say, 200MB at a time and then merging the results together at the end manually.
Rushyo
To elaborate a little:Assuming your HTTP request is 2GB, your content-length will also be 2GB. It doesn't matter whether you stream the packets, the server is expecting a request 2GB long. It needs to know how long to decide when to end the request. Apache is going to turn around and say 'no thanks' when it sees a content-length that large. Put simply, sending 2GB to a web server is non-standard. There's no situation in which you should have to do it. So a reasonable solution is to send smaller requests, one at a time, then have the server receiving the file put it back together at the end.
Rushyo
Rushyo i uploaded 1.1 GB of stream ,it looks Apache version issue
AMIT
but how do i do that ,means how do mearge these small requests??
AMIT
You're sending a file, right?. So split the file up into different parts and turn them into one file at the end using your preferred programming language. If you're not sure how to do that, I recommend starting a new question
Rushyo
Regarding it being Apache's fault, I recommend you read this before you go filing bug reports: http://www.catb.org/esr/faqs/smart-questions.html#id382249
Rushyo
what does that mean ,can i report erro about apache??
AMIT
nd i confirmed now that was bug that was already reported....
AMIT
@AMIT I'm really not convinced. Do you have a link? Just because there's a bug report doesn't mean it's a bug. Half of the bug reports on any major program are nonsense and end up getting ignored.
Rushyo