But again in this case the server seems to forget about the request without ever sending an error to the client. And I do get a rejection message ("Post Size exceeds the maximum limit 200 MB.") in server.log. ![]() Requests that hit a hard limit shouldn't be queued, just rejected. The case of "Maximum size of post data" being hit is still a bit of a mystery. The server forgets about the request entirely so it just lingers. But in my case, for some reason, that never happens. The TCP buffers fill up, window size becomes 0, and the client waits it to open up again, which should happen as soon as the server starts reading the request. The server doesn't have memory available to accept the upload, so it just doesn't read from the socket. Nobody has said anything to make me believe otherwise (although I also don't see anyone jumping up to say "yes, they did this stupid thing")Īlso with this new understanding, the stalled uploads make some sense. Every file is kept entirely in memory for the full duration of its upload. With my new understanding, I can see that the ratio RTM/MSOPD is the number of simultaneous uploads that will be allowed if they are all near the maximum size.Īssuming that the "Request Throttle Memory" is actually a memory buffer, and not a temporary file, this means that my worst fears were correct. In my first round of tests, with no clue about the relationship between them, I had them the other way around. The first thing I was missing was that "Request Throttle Memory" (RTM) does something useful if it is set higher than "Maximum size of post data" (MSOPD). Some experimentation has led me to a partial answer. I've never seen a "file too large" error message returned to a client from ColdFusion. Maybe I should ask first if anyone else can reproduce it. ![]() I assumed this would be a well-known problem. Why the server thread stalls forever instead of returning an error message when the limit is exceeded could be separate question. What I'm looking for here is not a quick "stuff a bigger number in there!" answer, but an detailed explanation of what these settings actually mean and what implications they have for server memory usage. I already figured out that if I increase "Request Throttle Memory" to 2000 MB it will allow a larger upload. I increased "Maximum size of post data" to 2000 MB and it didn't have an effect. I don't know why you'd want to know what values I've put in the limit fields, but they were both set to 200 MB for a while. Update Level /E:/ColdFusion10/cfusion/lib/updates/chf10000011.jar And what are we going to do, not allow gigabyte uploads? People have videos to post and no time for editing them! If whole-file slurping is actually what's going on, how do they expect us to choose a workable size limit? Allow a gigabyte and a few simultaneous users can run your server out of memory without even trying. surely a big company like Adobe with a web development product can get this right. (I know the structure of an HTTP multipart/form-data post makes it a little bit harder but. ![]() No sane person would do that, when an upload loop (read a medium-sized block, write it to disk, repeat until finished) is so easy. It hints at something I just don't want to believe: that ColdFusion slurps the entire uploaded file into memory before writing any of it to disk. If that's what it is, then I can't see how it's related to file sizes. All documentation about it speaks of it as the size of a memory region. The "Request Throttle" is a thing I really don't understand. The stuck threads just keep building up until there are none left to take new requests and the server has to be restarted. Even after the client gives up and disconnects, the associated apache thread is still tied up (I can see this using mod_status). The upload just hangs forever after sending about 1 TCP window worth of data. When someone tries to upload a file that's too big, they don't get a nice error message. I can't figure out why we need 2 of these whichever one is set higher doesn't have any effect as far as I can tell. ![]() If the size of your upload (including HTTP overhead) is bigger than either one of those settings, the upload is rejected. There are two settings in ColdFusion Administrator that limit the size of uploads: "Maximum size of post data" and "Request Throttle Memory". I'm trying to set up a coldfusion server to accept uploads of large files, and I'm bumping into some limits.
0 Comments
Leave a Reply. |