You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Daniel Savard <da...@gmail.com> on 2023/08/23 17:03:03 UTC

Tomcat 9.0.x on Windows crashing

Hi everyone,

I didn't specify the actual Tomcat version because the problem occurs under
all versions. We are running a commercial web application and all of sudden
after a while Tomcat is crashing without issuing any message. It is very
likely due to the application. But the vendor was of no help to solve this
problem which has existed for a long time. I suspect something like
insufficient memory allocated to the VM or something like that. Is there
anything I can do to gather more information on the root cause of this
issue?

Tomcat is running as a service and is restarted automatically if it
crashes. Again, the problem is very unlikely to be with Tomcat itself, but
the tuning of the VM.

-----------------
Daniel Savard

Re: Tomcat 9.0.x on Windows crashing

Posted by Daniel Savard <da...@gmail.com>.
Le jeu. 24 août 2023 à 02:29, Thomas Hoffmann (Speed4Trade GmbH)
<Th...@speed4trade.com.invalid> a écrit :

> Hello Daniel,
>
> > -----Ursprüngliche Nachricht-----
> > Von: Daniel Savard <da...@gmail.com>
> > Gesendet: Mittwoch, 23. August 2023 19:03
> > An: users@tomcat.apache.org
> > Betreff: Tomcat 9.0.x on Windows crashing
> >
> > Hi everyone,
> >
> > I didn't specify the actual Tomcat version because the problem occurs
> under
> > all versions. We are running a commercial web application and all of
> sudden
> > after a while Tomcat is crashing without issuing any message. It is very
> likely
> > due to the application. But the vendor was of no help to solve this
> problem
> > which has existed for a long time. I suspect something like insufficient
> > memory allocated to the VM or something like that. Is there anything I
> can
> > do to gather more information on the root cause of this issue?
> >
> > Tomcat is running as a service and is restarted automatically if it
> crashes.
> > Again, the problem is very unlikely to be with Tomcat itself, but the
> tuning of
> > the VM.
> >
> > -----------------
> > Daniel Savard
>
> You can also watch out for a file named hs_err_pid....
> If the JVM is crashing hard, it usually produces this file somewhere in
> the Tomcat folder.
>
> Greetings,
> Thomas
>

Thanks for the tip, there is no such file in the whole filesystem. So, the
JVM isn't crashing, but Tomcat is crashing.

-----------------
Daniel Savard

AW: Tomcat 9.0.x on Windows crashing

Posted by "Thomas Hoffmann (Speed4Trade GmbH)" <Th...@speed4trade.com.INVALID>.
Hello Daniel,

> -----Ursprüngliche Nachricht-----
> Von: Daniel Savard <da...@gmail.com>
> Gesendet: Mittwoch, 23. August 2023 19:03
> An: users@tomcat.apache.org
> Betreff: Tomcat 9.0.x on Windows crashing
> 
> Hi everyone,
> 
> I didn't specify the actual Tomcat version because the problem occurs under
> all versions. We are running a commercial web application and all of sudden
> after a while Tomcat is crashing without issuing any message. It is very likely
> due to the application. But the vendor was of no help to solve this problem
> which has existed for a long time. I suspect something like insufficient
> memory allocated to the VM or something like that. Is there anything I can
> do to gather more information on the root cause of this issue?
> 
> Tomcat is running as a service and is restarted automatically if it crashes.
> Again, the problem is very unlikely to be with Tomcat itself, but the tuning of
> the VM.
> 
> -----------------
> Daniel Savard

You can also watch out for a file named hs_err_pid.... 
If the JVM is crashing hard, it usually produces this file somewhere in the Tomcat folder.

Greetings,
Thomas

Re: Tomcat 9.0.x on Windows crashing

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Daniel,

On 8/28/23 14:37, Daniel Savard wrote:
> Le jeu. 24 août 2023 à 13:06, Christopher Schultz <
> chris@christopherschultz.net> a écrit :
> 
>> Daniel,
>>
>> On 8/23/23 13:03, Daniel Savard wrote:
>>> I didn't specify the actual Tomcat version because the problem occurs
>> under
>>> all versions. We are running a commercial web application and all of
>> sudden
>>> after a while Tomcat is crashing without issuing any message. It is very
>>> likely due to the application. But the vendor was of no help to solve
>> this
>>> problem which has existed for a long time. I suspect something like
>>> insufficient memory allocated to the VM or something like that. Is there
>>> anything I can do to gather more information on the root cause of this
>>> issue?
>>>
>>> Tomcat is running as a service and is restarted automatically if it
>>> crashes. Again, the problem is very unlikely to be with Tomcat itself,
>> but
>>> the tuning of the VM.
>>
>> What kind of environment (e.g. Windows vs UNIX, etc.)? What is running
>> the service? Are there log files for the service which are different
>> than usual (e.g. syslog vs catalina.out)?
>>
>> What are your memory settings, and how much physical RAM do you have?
>>
>> It's unlikely that the JVM is just disappearing without leaving any
>> trace. If you are on Linux, maybe you are the victim of oome-killer?
>> That will show in the syslog with a whole lot of output. Search syslog
>> for "oom" and you will probably find it right away if that's the cause.
>>
>> -chris
>>
> 
> Hi Chris,
> 
> Thanks for the answer.  It is running on Windows and it is running as a
> service which is configured to restart if it fails. No different log files
> at my knowledge except application logs.
> 
> There is 14 GB physical RAM on this server. Initial memory pool is 4 GB and
> maximum memory pool is 8 GB.
> 
> Well, the only thing I can say is Tomcat is failing at some point and
> shutting itself down or being shutdown or killed, I cannot say the JVM
> itself gets killed.

Windows... so Linux oome killer isn't a likely cause :)

"Windows Service" could mean a lot of things. Are you using the 
procrun-based service that Tomcat ships with? That should create 
stderr-* and stdout-* files in your logs directory which will be 
completely different than application logs.

Look at catalina.out, stderr/stdout and see if you see anything in there 
around the suspected time of termination.

-chris

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


Re: Tomcat 9.0.x on Windows crashing

Posted by Daniel Savard <da...@gmail.com>.
Le jeu. 24 août 2023 à 13:06, Christopher Schultz <
chris@christopherschultz.net> a écrit :

> Daniel,
>
> On 8/23/23 13:03, Daniel Savard wrote:
> > I didn't specify the actual Tomcat version because the problem occurs
> under
> > all versions. We are running a commercial web application and all of
> sudden
> > after a while Tomcat is crashing without issuing any message. It is very
> > likely due to the application. But the vendor was of no help to solve
> this
> > problem which has existed for a long time. I suspect something like
> > insufficient memory allocated to the VM or something like that. Is there
> > anything I can do to gather more information on the root cause of this
> > issue?
> >
> > Tomcat is running as a service and is restarted automatically if it
> > crashes. Again, the problem is very unlikely to be with Tomcat itself,
> but
> > the tuning of the VM.
>
> What kind of environment (e.g. Windows vs UNIX, etc.)? What is running
> the service? Are there log files for the service which are different
> than usual (e.g. syslog vs catalina.out)?
>
> What are your memory settings, and how much physical RAM do you have?
>
> It's unlikely that the JVM is just disappearing without leaving any
> trace. If you are on Linux, maybe you are the victim of oome-killer?
> That will show in the syslog with a whole lot of output. Search syslog
> for "oom" and you will probably find it right away if that's the cause.
>
> -chris
>

Hi Chris,

Thanks for the answer.  It is running on Windows and it is running as a
service which is configured to restart if it fails. No different log files
at my knowledge except application logs.

There is 14 GB physical RAM on this server. Initial memory pool is 4 GB and
maximum memory pool is 8 GB.

Well, the only thing I can say is Tomcat is failing at some point and
shutting itself down or being shutdown or killed, I cannot say the JVM
itself gets killed.

-----------------
Daniel Savard

Re: Tomcat 9.0.x on Windows crashing

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Daniel,

On 8/23/23 13:03, Daniel Savard wrote:
> I didn't specify the actual Tomcat version because the problem occurs under
> all versions. We are running a commercial web application and all of sudden
> after a while Tomcat is crashing without issuing any message. It is very
> likely due to the application. But the vendor was of no help to solve this
> problem which has existed for a long time. I suspect something like
> insufficient memory allocated to the VM or something like that. Is there
> anything I can do to gather more information on the root cause of this
> issue?
> 
> Tomcat is running as a service and is restarted automatically if it
> crashes. Again, the problem is very unlikely to be with Tomcat itself, but
> the tuning of the VM.

What kind of environment (e.g. Windows vs UNIX, etc.)? What is running 
the service? Are there log files for the service which are different 
than usual (e.g. syslog vs catalina.out)?

What are your memory settings, and how much physical RAM do you have?

It's unlikely that the JVM is just disappearing without leaving any 
trace. If you are on Linux, maybe you are the victim of oome-killer? 
That will show in the syslog with a whole lot of output. Search syslog 
for "oom" and you will probably find it right away if that's the cause.

-chris

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


Re: Tomcat 9.0.x on Windows crashing

Posted by Daniel Savard <da...@gmail.com>.
Le mer. 23 août 2023 à 13:16, Robert Turner <rt...@e-djuster.ca> a écrit :

> You can try adding:
>
> -XX:+HeapDumpOnOutOfMemoryError
> -XX:HeapDumpPath=C:\HeapDump\java_pid<pid>.hprof
>
> to the Java options (in "Configure Tomcat") to capture heap dumps on out of
> memory errors (adjust path to suit your configuration)
>
> Robert
>

Hi Robert,

I will look into it. For now, I cannot modify the system easily. I need to
plan a change for this with at least a one week notice and upon approval.
Will try to include this in a forthcoming change.

-----------------
Daniel Savard

Re: Tomcat 9.0.x on Windows crashing

Posted by Robert Turner <rt...@e-djuster.ca>.
You can try adding:

-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=C:\HeapDump\java_pid<pid>.hprof

to the Java options (in "Configure Tomcat") to capture heap dumps on out of
memory errors (adjust path to suit your configuration)

Robert


On Wed, Aug 23, 2023 at 1:03 PM Daniel Savard <da...@gmail.com>
wrote:

> Hi everyone,
>
> I didn't specify the actual Tomcat version because the problem occurs under
> all versions. We are running a commercial web application and all of sudden
> after a while Tomcat is crashing without issuing any message. It is very
> likely due to the application. But the vendor was of no help to solve this
> problem which has existed for a long time. I suspect something like
> insufficient memory allocated to the VM or something like that. Is there
> anything I can do to gather more information on the root cause of this
> issue?
>
> Tomcat is running as a service and is restarted automatically if it
> crashes. Again, the problem is very unlikely to be with Tomcat itself, but
> the tuning of the VM.
>
> -----------------
> Daniel Savard
>