You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Abraham Iglesias <ab...@genaker.net> on 2008/04/24 15:31:55 UTC

tomcat disappearing...

Hi all,
something very weird is happening on my tomcat environment. I am running
2 webapps within the servlet container. The tomcat process starts fine
in my linux box. However, it stops after some time. This time is random,
and it might be 5 min or 20 min, there is no pattern.

Does anyone know which might be the problem? Or in which way can I debug
what tomcat is doing? I enabled DEBUG level logs in my tomcat, but i
cannot see any error. Tomcat process just disappear...

thanks,

abraham


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: tomcat disappearing...

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Abraham,

Abraham Iglesias wrote:
| My linux boxes have 4GB RAM available and there is no trace about a out
| of memory error.

You won't get an OOME. Your process will simply disappear.

| In fact, i run 7 tomcats instances on different ports
| on the same machine.

That's goind to use a lot of memory... possibly leading to the OOM killer.

| However it is always the same one who disappears
| ... quite weird.

Not weird at all. Please read:

http://linux-mm.org/OOM_Killer

Reading this indicates that your process is a very good candidate for
killing:

1. It hasn't been running very long (because it keeps getting killed)
2. It spawns a lot of child processes (threads to handle incoming requests)
3. It uses a lot of memory (how big is your heap?)

| I can't see anything in /var/log/messages nor catalina.out indeed.

That's because the process DIES. Java isn't shutting itself down. The
kernel is murdering the process and covering its mouth so it can't
scream as it goes down.

Try setting /proc/<pid>/oom_adj to -17 as the article suggests and see
if a different process gets killed instead.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgQt2EACgkQ9CaO5/Lv0PB34QCgnhvQO7tQu2Q4rYdfV6W9jMQS
hGAAoLB8Tv84WiF8uwZdSV4y2iMmg+v4
=uhhy
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: tomcat disappearing...

Posted by Ronald Klop <ro...@base.nl>.
Is there System.exit(0) in your code?

Ronald.

On Thu Apr 24 16:11:58 CEST 2008 Tomcat Users List <us...@tomcat.apache.org> wrote:
> Hi Mark,
> thanks for your reply.
> 
> My linux boxes have 4GB RAM available and there is no trace about a out 
> of memory error. In fact, i run 7 tomcats instances on different ports 
> on the same machine. However it is always the same one who disappears 
> ... quite weird. I can't see anything in /var/log/messages nor 
> catalina.out indeed.
> 
> Any other clue? :S
> 
> Thanks for your reply. I really appreciate. :)
> 
> -bram
> 
> 
> Mark H. Wood escribi?:
> > First guess: the Linux "OOM killer". When memory gets desperately
> > tight, the kernel picks a victim process and terminates it to recover
> > some memory. Large processes lacking controlling terminals, such as
> > Tomcat, tend to be the preferred victims. Check your OS log files to
> > see if there are signs of severe memory pressure. You could also
> > investigate by experiment: try to provide a lot more swap space and
> > see if the problem is alleviated.
> >
> > If this is it, the real cure is more memory.
> >
> > 
> 
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 


Re: tomcat disappearing...

Posted by Abraham Iglesias <ab...@genaker.net>.
Hi Mark,
thanks for your reply.

My linux boxes have 4GB RAM available and there is no trace about a out 
of memory error. In fact, i run 7 tomcats instances on different ports 
on the same machine. However it is always the same one who disappears 
... quite weird. I can't see anything in /var/log/messages nor 
catalina.out indeed.

Any other clue? :S

Thanks for your reply. I really appreciate. :)

-bram


Mark H. Wood escribió:
> First guess: the Linux "OOM killer".  When memory gets desperately
> tight, the kernel picks a victim process and terminates it to recover
> some memory.  Large processes lacking controlling terminals, such as
> Tomcat, tend to be the preferred victims.  Check your OS log files to
> see if there are signs of severe memory pressure.  You could also
> investigate by experiment:  try to provide a lot more swap space and
> see if the problem is alleviated.
>
> If this is it, the real cure is more memory.
>
>   



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: tomcat disappearing...

Posted by "Mark H. Wood" <mw...@IUPUI.Edu>.
First guess: the Linux "OOM killer".  When memory gets desperately
tight, the kernel picks a victim process and terminates it to recover
some memory.  Large processes lacking controlling terminals, such as
Tomcat, tend to be the preferred victims.  Check your OS log files to
see if there are signs of severe memory pressure.  You could also
investigate by experiment:  try to provide a lot more swap space and
see if the problem is alleviated.

If this is it, the real cure is more memory.

-- 
Mark H. Wood, Lead System Programmer   mwood@IUPUI.Edu
Typically when a software vendor says that a product is "intuitive" he
means the exact opposite.