Forum OpenACS Q&A: Re: AOLserver 4.5 upload file size limit

Collapse
Posted by Tom Jackson on
Maybe the nssock module (maxinput):

ns_section "ns/module/$sock"
ns_param address      216.211.130.179
ns_param port          80
ns_param protocol      http
ns_param defaultserver $DefaultVirtualServer
ns_param maxpost      [expr 90 * 1024 * 1024] ; # 1000x1024
ns_param maxinput      [expr 90 * 1024 * 1024] ; # 1000x1024

# Optional params with defaults:
ns_param  bufsize              16000
ns_param  rcvbuf                0
ns_param  sndbuf                0
ns_param  socktimeout          30 ;# if < 1 == 30
ns_param  sendwait              30 ;# if < 1 == socktimeout
ns_param  recvwait              30 ;# if < 1 == socktimeout
ns_param  closewait            2  ;# if < 0 == 2
ns_param  keepwait              30 ;# if < 0 == 30
ns_param  backlog              5  ;# if < 1 == 5
ns_param  maxinput              [expr 90*1024*1024] ;# if < 1 = 1m
ns_param  readtimeoutlogging    true
ns_param  serverrejectlogging  true
ns_param  sockerrorlogging      true
ns_param  sockshuterrorlogging  true

ns_section "ns/modules"
ns_param  $sock        $home/bin/nssock.so

Collapse
Posted by Gustaf Neumann on
The upload configuration has changed between 4.0 and 4.5. In aolserver 4.5, the command ns_limits is used to change various settings.

To get the defaults, use the command (e.g. from ds/shell)

&nbsp;&nbsp;ns_limits get default

and you get

&nbsp;&nbsp; nrunning 1 nwaiting 0 ntimeout 0 ndropped 0 noverflow 0 maxwait 100 maxupload 10240000 timeout 60 maxrun 100

The file upload limit can be altered to e.g. twice the size (about 20MB) by

&nbsp;&nbsp; ns_limits set default -maxupload 20480000

This command can be written as well to the config-file

Collapse
Posted by Malte Sussdorff on
I totally forgot to mention that I changed this in teh config.tcl and wrote some code (already committed to HEAD) which sets the ns_limits accordingly.

if {[ns_info version] >= 4.5} {
ns_limits set default -maxupload [ns_config ns/server/wieners/module/nssock maxinput]
}