You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Sajid Hussain <sa...@codegic.com> on 2024/10/08 11:21:23 UTC
Migrating from Tomcat 9.0.88 to Tomcat 10.1.30 on windows machine with JDK 21 LTS
Hi,
I was using tomcat 9 with JDK 17 on windows. My java application was
using 2.7.18. Now I'm migrating my application spring version to 3.3.4
with Tomcat 10.1.30 and JDK 21. I have upgraded the version in my java
project and fix the hibernate error migrating from 5 to 6. Now my
application start on tomcat 10. But after few request JVM consume the
maximum memory (I set it 3GB max) and cup usage to 90-98%. I set windows
service priority to low and it take 80-90% hence my application stop
responding. Here is the thread dum for the tomcat.Not getting any clue
whats causing to tomcat high CPU and memory usage.
Regards,
Sajid Hussain
Re: Migrating from Tomcat 9.0.88 to Tomcat 10.1.30 on windows machine with JDK 21 LTS
Posted by Mark Thomas <ma...@apache.org>.
On 09/10/2024 05:49, Sajid Hussain wrote:
> Hi,
>
> Thanks for the quick response. Yes its spring boot application and
> packaged as War file. The Tomcat running as windows service using Apache
> common daemon.
>
> I'm also attaching the stack trace observe in memory analyzer.
You need to look at the heap usage to see where the memory is being used.
Most profilers should also be able to tell where the CPU time is being
spent.
Did you look at DAEMON-460? Does it apply to you?
Mark
>
>
> Regards,
> Sajid
>
> On 10/9/2024 4:24 PM, Mark Thomas wrote:
>> Please send your reply to the users list so I can reply there.
>>
>> Mark
>>
>>
>> On 08/10/2024 06:23, Sajid Hussain wrote:
>>> Hi Mark,
>>>
>>> Thanks for the quick response. Yes its spring boot application and
>>> packaged as War file. The Tomcat running as windows service using
>>> Apache common daemon.
>>>
>>>
>>> Sajid
>>>
>>> On 10/8/2024 4:47 PM, Mark Thomas wrote:
>>>> On 08/10/2024 05:21, Sajid Hussain wrote:
>>>>> Hi,
>>>>>
>>>>> I was using tomcat 9 with JDK 17 on windows. My java application
>>>>> was using 2.7.18. Now I'm migrating my application spring version
>>>>> to 3.3.4 with Tomcat 10.1.30 and JDK 21. I have upgraded the
>>>>> version in my java project and fix the hibernate error migrating
>>>>> from 5 to 6. Now my application start on tomcat 10. But after few
>>>>> request JVM consume the maximum memory (I set it 3GB max) and cup
>>>>> usage to 90-98%. I set windows service priority to low and it take
>>>>> 80-90% hence my application stop responding. Here is the thread dum
>>>>> for the tomcat.Not getting any clue whats causing to tomcat high
>>>>> CPU and memory usage.
>>>>
>>>> A profiler (I use YourKit because they give free licenses to OSS
>>>> develoeprs but other profilers are avialable) will tell you more
>>>> about what is going on than a single stack trace.
>>>>
>>>> Is this a Spring Boot app? Is it packaged as a JAR or a WAR?
>>>>
>>>> How are you running this as a Windows service? If you are using
>>>> Apache Commons Daemon (the default way to run Tomcat as a Windows
>>>> service) then this might be useful:
>>>> https://issues.apache.org/jira/projects/DAEMON/issues/DAEMON-460
>>>>
>>>> Mark
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Migrating from Tomcat 9.0.88 to Tomcat 10.1.30 on windows machine with JDK 21 LTS
Posted by Sajid Hussain <sa...@codegic.com>.
Hi,
Thanks for the quick response. Yes its spring boot application and
packaged as War file. The Tomcat running as windows service using Apache
common daemon.
I'm also attaching the stack trace observe in memory analyzer.
Regards,
Sajid
On 10/9/2024 4:24 PM, Mark Thomas wrote:
> Please send your reply to the users list so I can reply there.
>
> Mark
>
>
> On 08/10/2024 06:23, Sajid Hussain wrote:
>> Hi Mark,
>>
>> Thanks for the quick response. Yes its spring boot application and
>> packaged as War file. The Tomcat running as windows service using
>> Apache common daemon.
>>
>>
>> Sajid
>>
>> On 10/8/2024 4:47 PM, Mark Thomas wrote:
>>> On 08/10/2024 05:21, Sajid Hussain wrote:
>>>> Hi,
>>>>
>>>> I was using tomcat 9 with JDK 17 on windows. My java application
>>>> was using 2.7.18. Now I'm migrating my application spring version
>>>> to 3.3.4 with Tomcat 10.1.30 and JDK 21. I have upgraded the
>>>> version in my java project and fix the hibernate error migrating
>>>> from 5 to 6. Now my application start on tomcat 10. But after few
>>>> request JVM consume the maximum memory (I set it 3GB max) and cup
>>>> usage to 90-98%. I set windows service priority to low and it take
>>>> 80-90% hence my application stop responding. Here is the thread dum
>>>> for the tomcat.Not getting any clue whats causing to tomcat high
>>>> CPU and memory usage.
>>>
>>> A profiler (I use YourKit because they give free licenses to OSS
>>> develoeprs but other profilers are avialable) will tell you more
>>> about what is going on than a single stack trace.
>>>
>>> Is this a Spring Boot app? Is it packaged as a JAR or a WAR?
>>>
>>> How are you running this as a Windows service? If you are using
>>> Apache Commons Daemon (the default way to run Tomcat as a Windows
>>> service) then this might be useful:
>>> https://issues.apache.org/jira/projects/DAEMON/issues/DAEMON-460
>>>
>>> Mark
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>
Re: Migrating from Tomcat 9.0.88 to Tomcat 10.1.30 on windows machine with JDK 21 LTS
Posted by Mark Thomas <ma...@apache.org>.
On 08/10/2024 05:21, Sajid Hussain wrote:
> Hi,
>
> I was using tomcat 9 with JDK 17 on windows. My java application was
> using 2.7.18. Now I'm migrating my application spring version to 3.3.4
> with Tomcat 10.1.30 and JDK 21. I have upgraded the version in my java
> project and fix the hibernate error migrating from 5 to 6. Now my
> application start on tomcat 10. But after few request JVM consume the
> maximum memory (I set it 3GB max) and cup usage to 90-98%. I set windows
> service priority to low and it take 80-90% hence my application stop
> responding. Here is the thread dum for the tomcat.Not getting any clue
> whats causing to tomcat high CPU and memory usage.
A profiler (I use YourKit because they give free licenses to OSS
develoeprs but other profilers are avialable) will tell you more about
what is going on than a single stack trace.
Is this a Spring Boot app? Is it packaged as a JAR or a WAR?
How are you running this as a Windows service? If you are using Apache
Commons Daemon (the default way to run Tomcat as a Windows service) then
this might be useful:
https://issues.apache.org/jira/projects/DAEMON/issues/DAEMON-460
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
AW: Migrating from Tomcat 9.0.88 to Tomcat 10.1.30 on windows machine with JDK 21 LTS
Posted by "Thomas Hoffmann (Speed4Trade GmbH)" <Th...@speed4trade.com.INVALID>.
Hello Sajid,
> -----Ursprüngliche Nachricht-----
> Von: Sajid Hussain <sa...@codegic.com>
> Gesendet: Dienstag, 8. Oktober 2024 13:21
> An: users@tomcat.apache.org
> Betreff: Migrating from Tomcat 9.0.88 to Tomcat 10.1.30 on windows
> machine with JDK 21 LTS
>
> Hi,
>
> I was using tomcat 9 with JDK 17 on windows. My java application was using
> 2.7.18. Now I'm migrating my application spring version to 3.3.4 with Tomcat
> 10.1.30 and JDK 21. I have upgraded the version in my java project and fix the
> hibernate error migrating from 5 to 6. Now my application start on tomcat 10.
> But after few request JVM consume the maximum memory (I set it 3GB max)
> and cup usage to 90-98%. I set windows service priority to low and it take 80-
> 90% hence my application stop responding. Here is the thread dum for the
> tomcat.Not getting any clue whats causing to tomcat high CPU and memory
> usage.
>
>
>
> Regards,
>
> Sajid Hussain
the CPU usage is often high when the garbage collector can't free up sufficient memory.
The memory usage shows little spikes going up and down, like a little sawtooth in this case.
If this is the case, I would recommend creating a heap dump and analyze the dump, what is occupying the memory.
Eclipse MAT will assist you in analyzing the heap dump.
Greetings, Thomas