Hello!

We had crashes on startup as well. Here is a description and the solution of the problem:

http://sourceforge.net/p/tcl/bugs/5238/

There is a very good information, why you should do this, even when you experience no crashes here:

https://next-scripting.org/xowiki/docs/misc/thread-mallocs/index1

Concerning thread creation: use naviserver 4.99.5 from the repository, it has some significant improvements. Then check your server section in the configuration file. Our look like this:

ns_section "ns/server/${servername}"
  ns_param   directoryfile   $directoryfile
  ns_param   pageroot        $pageroot
  ns_param   enabletclpages  true ;# Parse *.tcl files in pageroot.

  # Maximum number of connection structures
  ns_param   maxconnections    240;# 100; determines queue size as well (good number: 100 + maxthreads)

  # Minimal and maximal number of connection threads
  ns_param   minthreads        20
  ns_param   maxthreads        40

  # Connection thread lifetime management
  ns_param connsperthread  10000        ;# Number of connections (requests) handled per thread
  ns_param threadtimeout   [expr 30*60] ;# Timeout for idle threads

  # Connection thread creation eagerness
  #ns_param  lowwatermark  10       ;# 10; create additional threads above this queue-full percentage
  #ns_param  highwatermark 100      ;# 80; allow concurrent creates above this queue-is percentage

The interesting bit ist the "maxconnections" parameter. This is the maximum queue length. In the above example, naviserver would put a maximum of 240 requests to the queue, before it returns errors to the clients. As there is a maximum of 40 threads, the real queue length ist 200. When number of requests in the queue reaches the lowwatermark (you can see the value on startup), threads are created. When it reaches the highwatermark, threads are created in parallel. With "ns_server stats" you get some statistics, which tell you how many requests have been queued. There is also a page in nsstats (nsstats?@page=process) where you get the value in percent. If this values are very hight, you should consider a higher value for minthreads.

You can get much more information from here:

https://next-scripting.org/xowiki/docs/misc/naviserver-connthreadqueue/index1

With naviserver 4.99.5, the tcmalloc and the settings above, we have a very stable system which handles 200 pages/secs over several hours up to 1500 pages/secs.

regards,

Wolfgang

Am 2014-01-01 18:57, schrieb John Buckman:
Hello navifans,

I'm in the process of trying to move to Naviserver from Aolserver.  

I'm finding that naviserver is not launching new threads, and is just qeueing requests up to be handled by a single thread, despite maxthreads being set high.

I can get around that problem if I change
   ns_section 	"ns/server/${servername}"
   ns_param   	minthreads      	1
to
   ns_section 	"ns/server/${servername}"
   ns_param   	minthreads      	100

and then the server *does* use multiple threads.  That shouldn't be needed, though.

Is there a config parameter I need to twiddle to enable one-demand thread creation?

I also have the following two other problems:
1) if I try a minthreads of 50 or larger, nsd crashes on startup
2) apachebench with a concurrency of 50 causes nsd to crash (at 20 threads)

I'm running debian squeeze, with a number of production aolservers that run stably also on the same box.

Any thoughts?

-john


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


--

Wolfgang Winkler
Geschäftsführung
wolfgang.wink...@digital-concepts.com
mobil +43.699.19971172

dc:büro
digital concepts Novak Winkler OG
Software & Design
Landstraße 68, 5. Stock, 4020 Linz
www.digital-concepts.com
tel +43.732.997117.72
tel +43.699.1997117.72

Firmenbuchnummer: 192003h
Firmenbuchgericht: Landesgericht Linz



PS: BESUCHEN SIE UNSERE NEUE SHOP INFO SEITE: www.shop-info.at

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Reply via email to