Forum OpenACS Q&A: Re: File Storage: can't upload large files

Collapse
Posted by Steve Manning on
In addition to the maxinput specified for http connections, you also need a separate maxinput for https connections. Dossy posted this on the AOLserver list this week:

------------------------------------------------
...if you're using nsopenssl,you may think that a similar config section like this should work:
    ns_section "ns/server/${servername}/module/nsopenssl"     
    ns_param   maxinput              [expr 1024 * 1024 * 100]

But, it doesn't!  (Ross Simpson and I found this out the hard way, with
two hours of much gnarly debugging and head-scratching.) So, how DO you
set "maxinput" for nsopenssl? Well, nsopenssl has a "ssldrivers" config section, that might look like
the following:

    ns_section "ns/server/${servername}/module/nsopenssl/ssldrivers"    
    ns_param example   "an example server"That defines the ssldriver named "example".  

You set parameters for it(like you do for nssock) in this config section:    

   ns_section "ns/server/${servername}/module/nsopenssl/ssldriver/example"   
   ns_param   sslcontext            example_ctx    
   ns_param   port                  443    
   # ... etc ...    
   ns_param   maxinput              [expr 1024 * 1024 * 100]

Yes, you define parameters like "maxinput" and "recvwait" and other
socket-related settings in THIS section! Yes, this is where those
settings belong. Interesting bug: in at least nsopenssl (and perhaps nssock),
if maxinput is reached, the server seems to sleep or simply spin, instead of
returning some kind of error ("400 Bad Request / request exceedsmaxinput" or somesuch).  

So, the diagnostic behavior is if you'reuploading a large file that exceeds maxinput, the browser just appears
to be still sending the file and it never finishes (until "recvwait"seconds elapse, I believe).

-- Dossy--Dossy Shiobara                       
mail: dossy@panoptic.comPanoptic Computer Network             web: http://www.panoptic.com/  
---------------------------------------------------------

- Steve