There is a configuration setting which saves posted files to disk. You need the ns_limits maxupload to be large enough, then maxinput (not sure which config section) sets an upper limit for in memory data.
This gets decided in driver.c, around line 1892: 1891 max = connPtr->roff + connPtr->contentLength + 2; 1892 if (max < connPtr->drvPtr->maxinput) { 1893 /* 1894 * Content will fit at end of request buffer. 1895 */ ... 1899 } else { 1900 /* 1901 * Content must overflow to a temp file. 1902 */ 1903 1904 connPtr->flags |= NS_CONN_FILECONTENT; 1905 connPtr->tfd = Ns_GetTemp(); 1906 if (connPtr->tfd < 0) { 1907 return E_FDAGAIN; 1908 } tom jackson On Tue, Nov 17, 2009 at 9:06 PM, John Buckman <j...@bookmooch.com> wrote: > I'm developing a music submission system for Magnatune.com using aolserver > and I'm seeing some problems with large file uploads. > > Specifically, aolserver periodically crashes due to a malloc error. > > It looks like aolserver stores files being uploaded (via form > enctype="multipart/form-data") in memory as they're being uploaded. When > people are uploading zip files of WAV-quality rips of CDs, that's 800mb of > RAM per upload. A few concurrent uploads, and splat. > > It looks like Naviserver has changed the aolserver code in Naviserver 4.99.1 > to >> - Using temporary files for large uploads when content exceeds >> pre-configured maxsize parameter >> - New spooler thread for handling large file uploads > > > Does it make sense to port this naviserver code over to aolserver? > > Or, is there another (easier) way to handle large file uploads that doesn't > use lots of memory? > > -john > > > -- > AOLserver - http://www.aolserver.com/ > > To Remove yourself from this list, simply send an email to > <lists...@listserv.aol.com> with the > body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: > field of your email blank. > -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to <lists...@listserv.aol.com> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.