HTTP post size limit?
-
Is there a limit on the size of a HTTP post? (Or any Aolserver doctors in the house?) I am developing a web application that takes addresses as input and am trying to determine the limit of number of addresses which can be accepted. At around 1000 addresses the webserver (Aolserver) logs an error "post size nnnnn exceeds maxpost limit of 65536" and firefox returns "document contains no data" (hehe). I believe I've configured the webserver to accept larger posts (using ns_param maxpost in the ns_section "ns/parameters" of the config.tcl file) but it still doesn't seem to be taking larger posts. Is there something magical about 65536 bytes? Is there a limit defined in the HTTP spec? Are browsers designed to handle posts larger than that?
-
Answer:
The maxpost parameter goes in the ns/server/$servername section, like pageroot, directoryfile, directorylisting, etc. At least, with aolserver 3.3 it does. I believe with 4 it does also. 655536, btw, is just the largest integer that fits into an unsigned long int. (expr pow(2,16))
If I Had An Anus at Ask.Metafilter.Com Visit the source
Other answers
Nothing magical other than being a 16 bit number. Did you reboot the server after making that change? When I make max file size changes in the php config they don't take till I kick the server and it reloads the setting.
phearlez
The extra 5 stands for BYOBB
RustyBrooks
65536 is 216, which is probably the upper range of some kind of data type in whatever programming language your software is written in. Hard to say without knowing more.
odinsdream
No, you can POST multi-gig binaries via HTTP just fine; this is a problem with aolserver.
cmonkey
RustyBrooks is right. I had the parameter in the wrong section. Thanks. Ok, next question, is there a reason (security, I'll blow up the machine, etc) we shouldn't accept say 2gig queries?
If I Had An Anus
Ok, next question, is there a reason (security, I'll blow up the machine, etc) we shouldn't accept say 2gig queries? As long as the script that parses that data can handle the input properly, you should be fine. And keep in mind your file system limits if you're spooling that input to a tmp file.
cmonkey
It kind of depends on how you're posting. There is sort of a builtin function in aolserver that accepts mime posts that are sent with the multi part encoding. This works fine, but when files get to 50-100 megs, it slows down enormously. I found out why at some point in the past but I've long since forgotten. Most of the time I post data in binary format and use my own handler (you can get the raw post data from aolserver). I don't remember the details of this since I wrote it and forgot it, but it works OK. If I'm transferring really large files I just use ftp. Probably not an option if your application is browser-based. If it's not, there is a good ftp library built into tcllib. Also, I think by default, with the muti-part encoding thing, it's going to dump the temp files in /tmp -- make sure you have enough room there for whatever you're uploading. Those files should get cleaned up properly when the connection closes.
RustyBrooks
In answer to the original question, there's no technical limit defined by HTTP, though a TCP/IPv4 connection runs out of sequence numbers after 255 terabytes. I've also noticed some some ISPs' transparent HTTP caches fall over when presented with POST data larger than a few KB.
cillit bang
Thanks, guys...my company owes askmefi mucho dinero...it would have taken forever to research such good advice. Right now we've capped it at 1gig and the system doesn't seem to be choking...of course that's only one query at a time. Just an FYI, I'm not talking about multi-part file upload...this is a regular post of text data.
If I Had An Anus
Related Q & A:
- How To Find Http Proxy?Best solution by Super User
- How to Post an XML in HTTP?Best solution by Stack Overflow
- Is there a limit on the size of a new file or a text file?Best solution by Stack Overflow
- What is the size limit on Yahoo mail?Best solution by Yahoo! Answers
- What is the legal size limit on trout in california?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.