Forum OpenACS Q&A: Re: Aolserver 4.5 multithreading

Collapse
Posted by Jay Dubanik on
Tom,
Thank you for this info.
I have sucessfuly created new threadpools.

as for mapping.
Is there a way to find out which threadpool is actualy taking your request?
and lastly should myDefault be mapped with { GET /} or {GET /*} ?

Thanks

Collapse
Posted by Tom Jackson on
I've written a patch to 4.5 which prints the threadpool used for each log statement printed. It hasn't been added to CVS yet. I also added a new subcommand to ns_pools:

ns_pools query server method url

It returns the name of the pool which would be used given the server (the $server string in your config file), method (GET/POST/HEAD/whatever) and the request url.

I'm not sure if {GET /} works or not, if you want it to be a default, use {GET /*} just to be clear.

Here is what the patched server shows:
[13/Sep/...][-nssock2:driver-] Notice: GetPool: matched method GET and url /ws/a.jpg on server tutos using pool tutos-default
[13/Sep/...][-tutos-default:2-] Notice: Running file-not-found.tcl for GET /ws/a.jpg HTTP/1.1
...
[13/Sep/...][-nssock2:driver-] Notice: GetPool: matched method GET and url /ws/a-thumb.jpg on server tutos using pool tutos-fast
[13/Sep/...][-tutos-fast:0-] Notice: Running file-not-found.tcl for GET /ws/a-thumb.jpg HTTP/1.1

where tutos-fast and tutos-default are the two threadpool names. In unpatched versions, you would get -conn:0- instead.