> > C] Sometime when the tomcat is started it spwans more than one processes. > >And then during shudown it creates problems. Also sometimes the list of open > >files goes beyond 1024. that is he ulimit. due to which he tomcat doesnot > >respond. > > > > > > Linux kernel 2.4 emulates threads through lightweight processes/tasks. > There is nothing fundamentally wrong about it (perhaps internal resource > ecconomics are misused), AFAIK, but the "ps" output is going to confuse > you, showing each thread as a separate process. Nothing problematic > about it. > > The number of 1024 processes/threads is alarming, however. TC will > normally wpawn idle worker threads to prepare for future requests, but > the parameter is usually less than 100. I'd say your application is > launching threads for some reason. Either that or there is a serious bug > in your system.
On older system, kernel 2.4.x, there is indeed a problem with that many threads. After creating more then X thread, where X was about 500 for tomcat, tomcat will not be able to create more threads and throw an (confusing) OutOfMemoryError. If this occures it stops answering and refuses futher service. You will then be able to monitor that tomcat halfs its threads all 3-5 minutes, until it dies silently with ~40 threads. However, this is only partially tomcats problem (it shouldn't die on OutOfMemoryErrors), but more of the JVM and the underlying thread library. However with NPTL (which is default for 2.6.x distributions) you can spawn enough threads (I think about 3500). Anyway, ulimit of 1024 is very low, since tomcat watches all jsp files for changes (unless you switched reloading off). So my advice, upgrade to 2.6.x kernel (sarge under debian), set ulimit to 8192, rethink your threading settings. The only reason you could actually need 1000 threads is having http 1.1 with keep-alives on and users with slow connections. regards Leon --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
