You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Nikola Milutinovic <Ni...@ev.co.yu> on 2005/09/27 17:43:38 UTC

Re: (WAS) Generic Types support in Tomcat?

Santosh Asbe wrote:

>Hi all,
>  
>

Hi. First of all, it is very advisable to use a separate thread when 
opening a new topic. I am not reprimanding you, I'm merely advising. I 
do not consider it rude to "jump into" someone elses thread of 
discussion - I do not consider this thread "mine", in the first place. 
The problem is, this thread has been going on for some time and most 
people are not going to bother reading it at all, so you will loose 
valuable audience.

> A] I am using tomcat 4.1.30 ( 32 bit) with Apache 2.0.46 ( this is standard
>apache which comes with RHEL 3.0). I am currently using RHEL 32 bit without
>RAID confiuration.
>  
>

There is no 32-bit version of TC, it is Java application. JVM, of 
course, is and should be 32/64-bit.

> Now i am planning to move to 64 bit RHEL 3.0 with RAID configuration but he
>the new Apache of RHEL 3.0 and same tomcat 4.1.30 ( 32 bit).
> I am facing a problem with mod_jk.
>I feel it is 32 bit complied mod_jk.
>  
>

It most likely is.

> Can anyone help me with the solution
>  
>

Unless you can locate a 64-bit version of mod_jk, try compiling your own 
version. You'll need apache-devel-* RPM for that. Some might say that 
even 32-bit version of mod_jk will work, but I would fly away from it - 
mod_jk is a sensitive pieve of software, connecting (multithreaded) 
Apache with multithreaded TC and the version should be as close to the 
target platform, as possible.

> B] Also my tomcat goes into hang state . So i have set an parameter
>LD_ASSUME_KERNEL=2.4.21. That is my Linux kernel version. Is this ok. where
>do i set this parameter. i have set it in the catalina.sh.
>  
>

The location is OK, but you should not use it on the new kernel. Is it 
2.6.x? Older releases of 2.6 branch had a problem with JVM and you had 
to set that parameter. New releases should be bug free.

> 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.

> D] I am currently using 4.1.30 version of tomcat. Are there any fixes or
>upgrades for this tomcat. Can you inform me the link for the same.
>  
>

4.1.30 is the last "normal" RPM, I know of. There are newer versions, 
check out www.JPackage.org. Word of caution, prepare for RPM dependancy 
nightmare, unless you're using some RPM management tool.

Nix.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: (WAS) Generic Types support in Tomcat?

Posted by Leon Rosenberg <ro...@googlemail.com>.
> > 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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org