Forum OpenACS Q&A: Re: Aolserver 4.5 multithreading

Collapse
Posted by Tom Jackson on

Okay, so the basic default and error threadpools will use the info in

ns_section ns/server/myserver
ns_param directoryfile index.adp,index.html,index.htm
ns_param pageroot /var/lib/aolserver/myserver/www
ns_param maxconnections 250
ns_param maxdropped 0
ns_param maxthreads 60
ns_param minthreads 20
ns_param threadtimeout 120
ns_param globalstats false
ns_param urlstats true
ns_param maxurlstats 1000
ns_param ConnsPerThread 125

If you want to setup additional threadpools, you should look at the following example:

http://rmadilo.com/m2/servers/jnm/config/

The virtual server setup is in server.tcl, this ends up calling the other files in that directory for individual modules. But note, that you need to select different names than default or error for your specialized threadpools, otherwise the name will overwrite the values above.

You should also load the nscp module (ns control port), so that you can login to the running server and use [ns_pools list] and [ns_pools get] to get a list of the current threadpools and their settings:

 tom@localhost ~ $ telnet localhost 9999
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
login: nsadmin
Password: x

Welcome to jnm running at /web/nsd45/bin/nsd (pid 21784)
AOLserver/4.5.0 (aolserver4_5) for linux built on Aug 12 2007 at 09:18:31
CVS Tag: $Name:  $
jnm:nscp 1> ns_pools list
jnm-fast tutos-default default tutos-fast error
jnm:nscp 2> ns_pools get jnm-fast
minthreads 2 maxthreads 10 idle 2 current 2 maxconns 100 queued 0 timeout 120
jnm:nscp 3>         

The nscp.tcl file has the setup needed, the password is x. Note that this is to localhost, only a local user can login, you have to use ns_encrypt to create a new password.

Collapse
Posted by Nima Mazloumi on
Hi,

my server suddenly freezes under load. The server is still runing by not responding and there log freezes as well.

I use nscp to get some details:

nscp 22> ns_pools get default
minthreads 0 maxthreads 150 idle 0 current 100 maxconns 750 queued 21891 timeout 120

Any idea?

I've been playing with maxthreads and maxconnections. With smaller values the server freezes even earlier. This is a 2 CPU system with 4 cores, 64bit linux suse and 4 GB ram. I am using aolserver 4.5.

Collapse
Posted by Gustaf Neumann on
Nima, there are a few fixes in this regard in aolserver 4.5.1. I would recommend to upgrade.

-gustaf neumann