Re: Tomcat 9 memory leak message

2024-06-01 Thread Christopher Schultz
Jenny,

(Apologies for top-posting)

“Safely ignored” can mean many things. You are only in danger of running out of 
heap space. So if you aren’t worried about that, feel free to ignore the error 
message.

If it were my system, I would want to ensure a clean unload of the driver when 
the application shuts down.

But I don’t think it will harm anything besides your memory usage.

-chris

> On Jun 1, 2024, at 00:18, Ying Jin  wrote:
> 
> Chris,
> 
> Thanks for your reply!
> 
> We already removed the ojdbc8.jar file from the application's Web-inf/lib
> folder as suggested in the following post, however, we still got the
> warning messages below after the application is deployed to the Tomcat 9
> server.
> 
> https://stackoverflow.com/questions/6981564/why-must-the-jdbc-driver-be-put-in-tomcat-home-lib-folder
> 
> WARNING: The web application [Our Web Application Name] appears to have
> started a thread named [InterruptTimer] but has failed to stop it. This is
> very likely to create a memory leak. Stack trace of thread:
> 
> WARNING: The web application [Our Web Application Name] appears to have
> started a thread named [oracle.jdbc.diagnostics.Diagnostic.CLOCK] but has
> failed to stop it. This is very likely to create a memory leak. Stack trace
> of thread:
> 
> I also read some posts saying these warning messages can be safely ignored
> if the Tomcat version is greater than 7.0. I'm not sure if this is correct
> or not.
> 
> Please advise,
> 
> Many thanks!
> Jenny
> 
>> On Fri, May 31, 2024 at 3:50 PM Christopher Schultz <
>> ch...@christopherschultz.net> wrote:
>> 
>> Jenny,
>> 
>>> On 5/31/24 14:52, Ying Jin wrote:
>>> We removed the ojdbc8 driver jar from web-inf/lib from the web
>>> application and kept the ojdbc8 jar file in the Tomcat/lib folder, but
>>> we still can see the following memory link warning message whenever we
>>> redeploy the web application. We use the Tomcat 9 server in the Linux
>>> environment.
>> 
>> This list strips attachments. Can you re-post with text-only?
>> 
>>> The other warning message is about the "validateFile Problem with jar
>>> file /tomcat/lib/jolokia.jar. My question is if we can safely ignore
>>> these warning messages or not.
>>> 
>>> It would be great if you can shed some light on this issue.
>> 
>> If the message is something like "driver cannot be unloaded" then check
>> Tomcat with a debugger or even something like JVisualVM to see how many
>> WebappClassLoaders you have in memory.
>> 
>> If the driver causes the web application ClassLoader to be "pinned" in
>> memory, then it will never be removed and all those classes will
>> continue to use-up heap space until you restart the JVM. This gets worse
>> every time you reload your application without restarting the JVM. The
>> Manager application web UI can help you diagnose these a little.
>> 
>> The validation problem with the Jolokia JAR file will depend upon
>> exactly what it says. I would first get a replacement copy of the
>> Jolokia JAR file before bothering to try to diagnose it any further.
>> 
>> -chris
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>> 
>> 

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



Re: Tomcat 9 memory leak message

2024-06-01 Thread Ying Jin
Chris,

Thanks so much  for your suggestions!

We use Oracle version 19. I read the post you mentioned and found that this
warning message can be safely ignored. Please correct me if I'm wrong.

Thanks again!
Jenny



On Sat, Jun 1, 2024 at 7:57 AM Thomas Hoffmann (Speed4Trade GmbH)
 wrote:

> Hello Jenny,
>
> > -Ursprüngliche Nachricht-
> > Von: Ying Jin 
> > Gesendet: Samstag, 1. Juni 2024 00:18
> > An: Tomcat Users List 
> > Betreff: Re: Tomcat 9 memory leak message
> >
> > Chris,
> >
> > Thanks for your reply!
> >
> > We already removed the ojdbc8.jar file from the application's Web-inf/lib
> > folder as suggested in the following post, however, we still got the
> warning
> > messages below after the application is deployed to the Tomcat 9 server.
> >
> > https://stackoverflow.com/questions/6981564/why-must-the-jdbc-driver-be-
> > put-in-tomcat-home-lib-folder
> >
> > WARNING: The web application [Our Web Application Name] appears to have
> > started a thread named [InterruptTimer] but has failed to stop it. This
> is very
> > likely to create a memory leak. Stack trace of thread:
> >
> > WARNING: The web application [Our Web Application Name] appears to have
> > started a thread named [oracle.jdbc.diagnostics.Diagnostic.CLOCK] but has
> > failed to stop it. This is very likely to create a memory leak. Stack
> trace of
> > thread:
>
> I don't know which Oracle Version you are using.
> The JDBC-Driver seems to start some threads, but they are not stopped at
> shutdown of the application.
> One of the issues seems to be resolved in a newer version:
>
> https://stackoverflow.com/questions/78300946/how-to-not-run-or-stop-oracle-23-jdbc-driver-diagnostic-clock-thread
>
> >
> > I also read some posts saying these warning messages can be safely
> ignored if
> > the Tomcat version is greater than 7.0. I'm not sure if this is correct
> or not.
> >
> > Please advise,
> >
> > Many thanks!
> > Jenny
> >
> > On Fri, May 31, 2024 at 3:50 PM Christopher Schultz <
> > ch...@christopherschultz.net> wrote:
> >
> > > Jenny,
> > >
> > > On 5/31/24 14:52, Ying Jin wrote:
> > > > We removed the ojdbc8 driver jar from web-inf/lib from the web
> > > > application and kept the ojdbc8 jar file in the Tomcat/lib folder,
> > > > but we still can see the following memory link warning message
> > > > whenever we redeploy the web application. We use the Tomcat 9 server
> > > > in the Linux environment.
> > >
> > > This list strips attachments. Can you re-post with text-only?
> > >
> > > > The other warning message is about the "validateFile Problem with
> > > > jar file /tomcat/lib/jolokia.jar. My question is if we can safely
> > > > ignore these warning messages or not.
> > > >
> > > > It would be great if you can shed some light on this issue.
> > >
> > > If the message is something like "driver cannot be unloaded" then
> > > check Tomcat with a debugger or even something like JVisualVM to see
> > > how many WebappClassLoaders you have in memory.
> > >
> > > If the driver causes the web application ClassLoader to be "pinned" in
> > > memory, then it will never be removed and all those classes will
> > > continue to use-up heap space until you restart the JVM. This gets
> > > worse every time you reload your application without restarting the
> > > JVM. The Manager application web UI can help you diagnose these a
> little.
> > >
> > > The validation problem with the Jolokia JAR file will depend upon
> > > exactly what it says. I would first get a replacement copy of the
> > > Jolokia JAR file before bothering to try to diagnose it any further.
> > >
> > > -chris
> > >
> > > -
> > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > > For additional commands, e-mail: users-h...@tomcat.apache.org
> > >
> > >
>


AW: Tomcat 9 memory leak message

2024-06-01 Thread Thomas Hoffmann (Speed4Trade GmbH)
Hello Jenny,

> -Ursprüngliche Nachricht-
> Von: Ying Jin 
> Gesendet: Samstag, 1. Juni 2024 00:18
> An: Tomcat Users List 
> Betreff: Re: Tomcat 9 memory leak message
> 
> Chris,
> 
> Thanks for your reply!
> 
> We already removed the ojdbc8.jar file from the application's Web-inf/lib
> folder as suggested in the following post, however, we still got the warning
> messages below after the application is deployed to the Tomcat 9 server.
> 
> https://stackoverflow.com/questions/6981564/why-must-the-jdbc-driver-be-
> put-in-tomcat-home-lib-folder
> 
> WARNING: The web application [Our Web Application Name] appears to have
> started a thread named [InterruptTimer] but has failed to stop it. This is 
> very
> likely to create a memory leak. Stack trace of thread:
> 
> WARNING: The web application [Our Web Application Name] appears to have
> started a thread named [oracle.jdbc.diagnostics.Diagnostic.CLOCK] but has
> failed to stop it. This is very likely to create a memory leak. Stack trace of
> thread:

I don't know which Oracle Version you are using.
The JDBC-Driver seems to start some threads, but they are not stopped at 
shutdown of the application.
One of the issues seems to be resolved in a newer version:
https://stackoverflow.com/questions/78300946/how-to-not-run-or-stop-oracle-23-jdbc-driver-diagnostic-clock-thread

> 
> I also read some posts saying these warning messages can be safely ignored if
> the Tomcat version is greater than 7.0. I'm not sure if this is correct or 
> not.
> 
> Please advise,
> 
> Many thanks!
> Jenny
> 
> On Fri, May 31, 2024 at 3:50 PM Christopher Schultz <
> ch...@christopherschultz.net> wrote:
> 
> > Jenny,
> >
> > On 5/31/24 14:52, Ying Jin wrote:
> > > We removed the ojdbc8 driver jar from web-inf/lib from the web
> > > application and kept the ojdbc8 jar file in the Tomcat/lib folder,
> > > but we still can see the following memory link warning message
> > > whenever we redeploy the web application. We use the Tomcat 9 server
> > > in the Linux environment.
> >
> > This list strips attachments. Can you re-post with text-only?
> >
> > > The other warning message is about the "validateFile Problem with
> > > jar file /tomcat/lib/jolokia.jar. My question is if we can safely
> > > ignore these warning messages or not.
> > >
> > > It would be great if you can shed some light on this issue.
> >
> > If the message is something like "driver cannot be unloaded" then
> > check Tomcat with a debugger or even something like JVisualVM to see
> > how many WebappClassLoaders you have in memory.
> >
> > If the driver causes the web application ClassLoader to be "pinned" in
> > memory, then it will never be removed and all those classes will
> > continue to use-up heap space until you restart the JVM. This gets
> > worse every time you reload your application without restarting the
> > JVM. The Manager application web UI can help you diagnose these a little.
> >
> > The validation problem with the Jolokia JAR file will depend upon
> > exactly what it says. I would first get a replacement copy of the
> > Jolokia JAR file before bothering to try to diagnose it any further.
> >
> > -chris
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> >