The base.tcl file that comes with AOLserver was using maxconns - but
- I also saw maxconnections on the AOLserver Site. I went with the
base.tcl file.
M
On Aug 1, 2007, at 4:16 PM, Tom Jackson wrote:
I have added additional code for handling the old style (not too old)
which allows you to set up threadpools for specific methods + url
patterns.
Also, I think there is a bug in the new pools.tcl file. The
original maxconnections parameter was
changed to maxconns, can anyone verify that the old param was (and
should be) maxconnections?
The following info was taken from my error.log after startup using
the new pools.tcl file.
# Example:
ns_section ns/server/jnm
ns_param maxconnections 5
ns_param maxdropped 0
ns_param maxthreads 5
ns_param minthreads 5
ns_param threadtimeout 120
ns_section ns/server/jnm/pool/fast
ns_param maxconnections 100
ns_param minthreads 2
ns_param maxthreads 10
ns_param threadtimeout 120
ns_param map {GET /*-thumb.jpg}
ns_param map {GET /images/*-thumb.jpg}
ns_section ns/server/jnm/pools
ns_param fast {fast pool}
ns_section ns/server/tutos
ns_param maxconnections 6
ns_param maxdropped 0
ns_param maxthreads 6
ns_param minthreads 6
ns_param threadtimeout 126
ns_section ns/server/tutos/pool/default
ns_param maxconnections 99
ns_param minthreads 4
ns_param maxthreads 11
ns_param threadtimeout 123
ns_param map {GET /}
ns_param map {POST /}
ns_section ns/server/tutos/pool/fast
ns_param maxconnections 101
ns_param minthreads 3
ns_param maxthreads 11
ns_param threadtimeout 125
ns_param map {GET /*-thumb.jpg}
ns_param map {GET /*-thumb.gif}
ns_section ns/server/tutos/pools
ns_param default {default pool}
ns_param fast {fast pool}
------------
During startup, the following is printed to the error.log file:
[-main-] Notice: Default Pool: minthreads 5 maxthreads 5 idle 0
current 0 maxconns 5 queued 0 timeout 120
[-main-] Notice: fast Pool: minthreads 2 maxthreads 10 idle 0
current 0 maxconns 100 queued 0 timeout 120
[-main-] Notice: ns_pools registered fast jnm GET /*-thumb.jpg
[-main-] Notice: ns_pools registered fast jnm GET /images/*-thumb.jpg
[-main-] Notice: Default Pool: minthreads 6 maxthreads 6 idle 0
current 0 maxconns 6 queued 0 timeout 126
[-main-] Notice: default Pool: minthreads 4 maxthreads 11 idle 0
current 0 maxconns 99 queued 0 timeout 123
[-main-] Notice: ns_pools registered default tutos GET /
[-main-] Notice: ns_pools registered default tutos POST /
[-main-] Notice: fast Pool: minthreads 3 maxthreads 11 idle 0
current 0 maxconns 101 queued 0 timeout 125
[-main-] Notice: ns_pools registered fast tutos GET /*-thumb.jpg
[-main-] Notice: ns_pools registered fast tutos GET /*-thumb.gif
-----------------
Here is my pools.tcl file:
set cfgsection "ns/server/[ns_info server]"
set minthreads [ns_config $cfgsection minthreads 0]
set maxthreads [ns_config $cfgsection maxthreads 10]
set maxconns [ns_config $cfgsection maxconnections 0]
set timeout [ns_config $cfgsection threadtimeout 0]
ns_pools set default -minthreads $minthreads -maxthreads
$maxthreads -maxconns $maxconns -timeout $timeout
ns_log Notice "Default Pool: [ns_pools get default]"
# Setup optional threadpools
set poolSection $cfgsection/pools
set poolSet [ns_configsection $poolSection]
if {"$poolSet" ne ""} {
set poolSize [ns_set size $poolSet]
for {set i 0} {$i < $poolSize} {incr i} {
set poolName [ns_set key $poolSet $i]
set poolDescription [ns_set value $poolSet $i]
set poolConfigSection "ns/server/[ns_info server]/pool/$poolName"
set poolConfigSet [ns_configsection $poolConfigSection]
if {"$poolConfigSet" eq ""} {
continue
}
set poolMinthreads [ns_config $poolConfigSection minthreads
$minthreads]
set poolMaxthreads [ns_config $poolConfigSection maxthreads
$maxthreads]
set poolMaxconns [ns_config $poolConfigSection maxconnections
$maxconns]
set poolTimeout [ns_config $poolConfigSection threadtimeout
$timeout]
ns_pools set $poolName -minthreads $poolMinthreads -
maxthreads $poolMaxthreads -maxconns $poolMaxconns -timeout
$poolTimeout
ns_log Notice "$poolName Pool: [ns_pools get $poolName]"
set poolConfigSize [ns_set size $poolConfigSet]
for {set j 0} {$j < $poolConfigSize} {incr j} {
if {[string tolower [ns_set key $poolConfigSet $j]] eq "map"} {
set mapList [split [ns_set value $poolConfigSet $j]]
set poolMethod [lindex $mapList 0]
set poolPattern [lindex $mapList 1]
ns_pools register $poolName [ns_info server] $poolMethod
$poolPattern
ns_log Notice "ns_pools registered $poolName [ns_info server]
$poolMethod $poolPattern"
}
}
}
}
---------------------
tom jackson
On Wednesday 01 August 2007 10:50, Nathan Folkman wrote:
Bingo - Michael Andrews just contributed such a script.
- n
On 8/1/07, Tom Jackson <[EMAIL PROTECTED]> wrote:
I would just like to point out that 4.5 was released over one
year ago,
so the
cat is already out of the bag.
But more important: it seems like this is not really a problem.
The old
configuration can still be used. All we need is a script which
reads the
configuration data and runs the new commands.
Is there a command reference anywhere, or could someone provide a
simple
example of use?
If so, I can write a script and try to figure out where it should
go so
that
it executes at the correct time. When is this time anyway?
Apparently it
is
not during the sourcing of the config file.
tom jackson
On Wednesday 01 August 2007 09:33, Nathan Folkman wrote:
As I said before, if you have issues with the changes made in 4.5,
simply do not upgrade. There were a number of factors that led
to our
decision to release as we did, when we did. Unfortunately a lot
of the
backwards compatibility work never got completed. Sorry.
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to <
[EMAIL PROTECTED]> 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
<[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]>
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject:
field of your email blank.