Re: [AOLSERVER] What does 'exiting: exceeded max connections per thread' mean?

2011-02-20 Thread Gustaf Neumann
Aolserver uses "maxconns" (set via ns_pools), naviserver 
uses "connsperthread". If this configuration parameter is 
set to 0, a connection thread will never exit due to an 
exceeded number of connections handled by this thread. The 
"spread" value does not change this.

-gn

On 20.02.11 08:55, aT wrote:

Does  ConnsPerThread = 0  , have any affect on this ?
Should it be 0 , meaning as many connection per thread as 
possible ?




On 02/16/2011 08:26 AM, Gustaf Neumann wrote:
The thread exiting code is based on "maxconns" and 
"timeout". If e.g. maxconns is is very low (e.g. 20),
the default "spread" of 20 does not make a lot of change. 
Furthermore it is more important, when many
connection threads are configured (e.g. 80), and the 
there is much library code (e.g. fully configured

OpenACS). We use maxconns 1000 + the default spread.

-gn

On 16.02.11 00:26, Peter Sadlon wrote:
If you have a lot of .tcl files then it will take longer 
for the new threads to be created (so if you are using 
OpenACS then it can take awhile depending on the RAM and 
CPU power of your server)


Increase the connections per thread to 1000 and see how 
that works for you.  There is (in theory) a way to set 
each thread to be +/- 20% the number of max 
connections.  This would prevent all the threads from 
exiting and being recreated at around the same time, 
however, even when I tried using that (and I forget how 
to do it off the top of my head) it never seemed to 
work, all my connections would exit at the same time so 
I never looked into it further since I don't really have 
a lot of .tcl files to load and new thread creation was 
rather fast.  Perhaps someone else can speak to varying 
the number of connections per thread.




Date: Tue, 15 Feb 2011 15:17:08 -0800
From: thejackschm...@gmail.com
Subject: Re: [AOLSERVER] What does 'exiting: exceeded 
max connections per thread' mean?

To: AOLSERVER@LISTSERV.AOL.COM

From my own experience, it seems that I get a ton of 
that like all the threads (or a majority of them) have 
exceeded max connections and it seems that it does take 
a while before they start serving again.  I'd like to 
know if this is normal or should the turn around time be 
a lot quicker...


Thanks!
--




--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
 with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] What does 'exiting: exceeded max connections per thread' mean?

2011-02-20 Thread aT

Does  ConnsPerThread = 0  , have any affect on this ?
Should it be 0 , meaning as many connection per thread as possible ?



On 02/16/2011 08:26 AM, Gustaf Neumann wrote:
The thread exiting code is based on "maxconns" and "timeout". If e.g. 
maxconns is is very low (e.g. 20),
the default "spread" of 20 does not make a lot of change. Furthermore 
it is more important, when many
connection threads are configured (e.g. 80), and the there is much 
library code (e.g. fully configured

OpenACS). We use maxconns 1000 + the default spread.

-gn

On 16.02.11 00:26, Peter Sadlon wrote:
If you have a lot of .tcl files then it will take longer for the new 
threads to be created (so if you are using OpenACS then it can take 
awhile depending on the RAM and CPU power of your server)


Increase the connections per thread to 1000 and see how that works 
for you.  There is (in theory) a way to set each thread to be +/- 20% 
the number of max connections.  This would prevent all the threads 
from exiting and being recreated at around the same time, however, 
even when I tried using that (and I forget how to do it off the top 
of my head) it never seemed to work, all my connections would exit at 
the same time so I never looked into it further since I don't really 
have a lot of .tcl files to load and new thread creation was rather 
fast.  Perhaps someone else can speak to varying the number of 
connections per thread.




Date: Tue, 15 Feb 2011 15:17:08 -0800
From: thejackschm...@gmail.com
Subject: Re: [AOLSERVER] What does 'exiting: exceeded max connections 
per thread' mean?

To: AOLSERVER@LISTSERV.AOL.COM

From my own experience, it seems that I get a ton of that like all 
the threads (or a majority of them) have exceeded max connections and 
it seems that it does take a while before they start serving again. 
 I'd like to know if this is normal or should the turn around time be 
a lot quicker...


Thanks!
--
AOLserver -http://www.aolserver.com/


To Remove yourself from this list, simply send an email 
to  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 
 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 
 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 
 with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] What does 'exiting: exceeded max connections per thread' mean?

2011-02-15 Thread Gustaf Neumann
The thread exiting code is based on "maxconns" and 
"timeout". If e.g. maxconns is is very low (e.g. 20),
the default "spread" of 20 does not make a lot of change. 
Furthermore it is more important, when many
connection threads are configured (e.g. 80), and the there 
is much library code (e.g. fully configured

OpenACS). We use maxconns 1000 + the default spread.

-gn

On 16.02.11 00:26, Peter Sadlon wrote:
If you have a lot of .tcl files then it will take longer 
for the new threads to be created (so if you are using 
OpenACS then it can take awhile depending on the RAM and 
CPU power of your server)


Increase the connections per thread to 1000 and see how 
that works for you.  There is (in theory) a way to set 
each thread to be +/- 20% the number of max connections.  
This would prevent all the threads from exiting and being 
recreated at around the same time, however, even when I 
tried using that (and I forget how to do it off the top of 
my head) it never seemed to work, all my connections would 
exit at the same time so I never looked into it further 
since I don't really have a lot of .tcl files to load and 
new thread creation was rather fast.  Perhaps someone else 
can speak to varying the number of connections per thread.




Date: Tue, 15 Feb 2011 15:17:08 -0800
From: thejackschm...@gmail.com
Subject: Re: [AOLSERVER] What does 'exiting: exceeded max 
connections per thread' mean?

To: AOLSERVER@LISTSERV.AOL.COM

From my own experience, it seems that I get a ton of that 
like all the threads (or a majority of them) have exceeded 
max connections and it seems that it does take a while 
before they start serving again.  I'd like to know if this 
is normal or should the turn around time be a lot quicker...


Thanks!
--
AOLserver - http://www.aolserver.com/


To Remove yourself from this list, simply send an email 
to  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 
 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 
 with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] What does 'exiting: exceeded max connections per thread' mean?

2011-02-15 Thread Peter Sadlon

If you have a lot of .tcl files then it will take longer for the new threads to 
be created (so if you are using OpenACS then it can take awhile depending on 
the RAM and CPU power of your server)

Increase the connections per thread to 1000 and see how that works for you.  
There is (in theory) a way to set each thread to be +/- 20% the number of max 
connections.  This would prevent all the threads from exiting and being 
recreated at around the same time, however, even when I tried using that (and I 
forget how to do it off the top of my head) it never seemed to work, all my 
connections would exit at the same time so I never looked into it further since 
I don't really have a lot of .tcl files to load and new thread creation was 
rather fast.  Perhaps someone else can speak to varying the number of 
connections per thread.


Date: Tue, 15 Feb 2011 15:17:08 -0800
From: thejackschm...@gmail.com
Subject: Re: [AOLSERVER] What does 'exiting: exceeded max connections per 
thread' mean?
To: AOLSERVER@LISTSERV.AOL.COM

>From my own experience, it seems that I get a ton of that like all the threads 
>(or a majority of them) have exceeded max connections and it seems that it 
>does take a while before they start serving again.  I'd like to know if this 
>is normal or should the turn around time be a lot quicker...
Thanks!

--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
 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 
 with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] What does 'exiting: exceeded max connections per thread' mean?

2011-02-15 Thread Sep Ng
>From my own experience, it seems that I get a ton of that like all the 
threads (or a majority of them) have exceeded max connections and it seems 
that it does take a while before they start serving again.  I'd like to know 
if this is normal or should the turn around time be a lot quicker...

Thanks!


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
 with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] What does 'exiting: exceeded max connections per thread' mean?

2011-02-15 Thread Peter Sadlon

The server does it for you.

Date: Tue, 15 Feb 2011 14:53:34 -0800
From: thejackschm...@gmail.com
Subject: Re: [AOLSERVER] What does 'exiting: exceeded max connections per 
thread' mean?
To: AOLSERVER@LISTSERV.AOL.COM

Hi,
Is there a way of killing the threads once max connection has been reached or 
does aolserver automatically take care of this?
Regards

--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
 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 
 with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] What does 'exiting: exceeded max connections per thread' mean?

2011-02-15 Thread Peter Sadlon

I would recommend killing them, just in case there is some memory leak or other 
glitch which causes problems.  

For example, I had an issue with threads when I used a filter to process 
requests, the filter would use ns_adp_parse to parse an adp which would either 
fill the buffer with HTML or the adp would call ns_returnredirect.  Well as it 
turned out this (the redirect) actually infected the thread by setting the 
state to 'abort' but never actually clearing that state after the thread was 
done process the request.  The result was the next time this particular (now 
infected) thread would get called up to handle a request, it would see the 
'abort' state and not process the next adp from within the filter, which 
resulted in just a blank page being returned.

If you are just serving HTML pages and not doing anything remotely dynamic or 
fancy you may be safe with leaving the threads to handle an infinite number of 
requests, but why take the risk that something similar won't crop up over time? 
 I have fixed the issue I mentioned above and typically have my threads handle 
several thousand requests before exiting, so its not like you have to set it to 
a low number so that you are always destroying and creating threads.


Date: Tue, 15 Feb 2011 17:20:27 -0500
From: h...@wineaccess.com
Subject: Re: [AOLSERVER] What does 'exiting: exceeded max connections per 
thread' mean?
To: AOLSERVER@LISTSERV.AOL.COM



  



  
  
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]

Re: [AOLSERVER] What does 'exiting: exceeded max connections per thread' mean?

2011-02-15 Thread Sep Ng
Hi,

Is there a way of killing the threads once max connection has been reached 
or does aolserver automatically take care of this?

Regards


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
 with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] What does 'exiting: exceeded max connections per thread' mean?

2011-02-15 Thread Jeff Rogers

Haig Didizian wrote:

  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?


As others mentioned, the downside of letting a thread run forever is 
that a memory leak could cause the server to grow, so killing off the 
threads after some number of requests is a reasonable safety precaution. 
 The downside of killing off the threads is that it takes a nontrivial 
amount of time to start up a new thread;  letting the thread server 
multiple requests amortizes this startup time across all the requests. 
So it's a trade-off between performance and safety.


Naturally, the best way to find good values is to do the benchmarking 
yourself.  From what I recall the last time I did my own benchmarking 
there was very little additional performance to be had once you're 
serving 1000 requests per thread, although this could be higher if you 
have lots of library code.


Interesting side note: while lowering the number of conns per thread 
would seem to increase safety/stability at the cost of performance, I've 
found that lowering it too much (i.e., to 1 or 2 requests per thread) 
makes the server very unstable, often segfaulting after a handful of 
requests in quick succession.  Raising it to 15 or more requests per 
thread and I haven't seen any problems no matter how hard I hit the 
server.  This surely points to some kind of race condition, but I 
haven't figured out what it is.  I suspect it's just the server slapping 
an admin intentionally trying to cripple it :/


-J


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
 with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] What does 'exiting: exceeded max connections per thread' mean?

2011-02-15 Thread Haig Didizian

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 
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 
 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 
 with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] What does 'exiting: exceeded max connections per thread' mean?

2011-02-15 Thread Scott Goodwin
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 
>  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 
 with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] What does 'exiting: exceeded max connections per thread' mean?

2011-02-15 Thread Peter Sadlon

Someone wiser than me may correct me on this but I believe this is just a 
notice message.

Each thread can handle 126 connections ([expr $threads_maxthreads * 7]) after 
which the thread will get destroyed.  This is historically done to make sure 
any memory leak doesn't take over the machine, so if something was bad in the 
thread it would only exist for 126 connections then get destroyed.  A new 
thread is then created when it is needed, which will also get destroyed after 
126 connections.

So that message in the logs is just to let you know the thread severed 126 
connections and is being destroyed.

Date: Tue, 15 Feb 2011 22:49:05 +0800
From: tapsitu...@gmail.com
Subject: [AOLSERVER] What does 'exiting: exceeded max connections per thread' 
mean?
To: AOLSERVER@LISTSERV.AOL.COM

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 
 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 
 with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


[AOLSERVER] What does 'exiting: exceeded max connections per thread' mean?

2011-02-15 Thread Levy Bajamundi
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 
 with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.