Hi there,
Is there any wisdom in this community about whether it's better to let
these threads run forever, or whether it makes more sense to kill them
off after they process a number of connections?
Thanks,
Haig
On 2/15/2011 2:18 PM, Scott Goodwin wrote:
The code that each connection thread runs to service a connection is
wrapped within a while loop that starts at whatever you set ns/threads
-> maxconns to and counts down to zero. When it reaches 0, a
connection thread exits. If ns/threads -> maxconns is set to 0, then
your connection threads don't have a limit on how many connections
each one can handle and don't exit because they've serviced a given
number of connections. See the NsConnThread function in queue.c.
/s.
On Feb 15, 2011, at 9:49 AM, Levy Bajamundi wrote:
Hi,
Since we moved to Aolserver 4.5.1, we've been getting alot of these
on our logs: 'Notice: exiting: exceeded max connections per thread'.
Does that mean that Aolserver is receiving more connections than it
can handle? If so, what would you recommend us do? Our servers are
running on Debian Lenny 64bit with 3gb ram.
Here's our configurations file:
set nsthread_stacksize [expr 10*128*1024]
set adp_cachesize [expr 512*1024]
set threads_maxthreads 18
set threads_minthreads 1
...
ns_section "ns/server/${servername}"
ns_param directoryfile
"index.tcl,index.tct,index.vuh,index.atcl,index.adp,index.html,index.htm"
ns_param pageroot $pageroot
ns_param enabletclpages true ;# Parse *.tcl files in pageroot.
ns_param maxthreads $threads_maxthreads ;# Tune this to
scale your server
ns_param minthreads $threads_minthreads ;# Tune this
to scale your server
ns_param maxconnections [expr $threads_maxthreads * 7] ;#
Max connections to put on queue
ns_section "ns/threads"
ns_param stacksize $nsthread_stacksize
ns_param mutexmeter true
ns_param maxthreads $threads_maxthreads ;# Tune this to
scale your server
ns_param minthreads $threads_minthreads ;# Tune this
to scale your server
ns_param maxconnections [expr $threads_maxthreads * 7] ;#
Max connections to put on queue
Here's our pools.tcl file:
if {[info commands ns_pools] ne ""} {
set cfgsection "ns/threads"
set minthreads [ns_config $cfgsection minthreads 0]
set maxthreads [ns_config $cfgsection maxthreads 10]
set maxconns [ns_config $cfgsection maxconns [ns_config
$cfgsection ConnsPerThread 100]]
set timeout [ns_config $cfgsection threadtimeout 120]
set spread [ns_config $cfgsection spread 20]
ns_pools set default -minthreads $minthreads -maxthreads
$maxthreads -maxconns $maxconns -timeout $timeout -spread $spread
set cfgsection "ns/server/[ns_info server]"
ns_log notice "default thread pool: [ns_pools get default]"
set minbusythreads [ns_config $cfgsection MinBusyThreads 0]
set maxbusythreads [ns_config $cfgsection MaxBusyThreads 10]
ns_pools set error -minthreads $minbusythreads -maxthreads
$maxbusythreads -timeout $timeout -maxconns $maxconns -spread $spread
ns_log notice "error thread pool: [ns_pools get error]"
if {[info commands ns_limits] ne ""} {
if {[set maxinput [ns_config $cfgsection/module/nssock
maxinput]] ne ""} {
ns_limits set default -maxupload $maxinput
}
set maxwait [ns_config $cfgsection MaxWait 100]
set maxwaittime [ns_config $cfgsection MaxWaitTime 60]
ns_limits set default -maxrun $maxthreads -maxwait $maxwait
-timeout $maxwaittime
ns_log notice "default limits: [ns_limits get default]"
}
}
Any help would be greatly appreciated.
Thanks,
Levy Bajamundi
-- AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to
<lists...@listserv.aol.com <mailto: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.
--
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.