On Fri, Feb 7, 2025 at 12:27 PM Jalaj Asher
<jalaj.as...@eclinicalworks.com.invalid> wrote:

> Thanks mark for the response.
>
> I am not sure why the tomcat is not doing the auto clean up. But we did
> try using the deleteonexithook approach but that introduces its own set of
> problems. Is there a recommendation to clean up the folder while the
> tomcats are running ? as we don’t stop and restart the services very often.
>
>
First, I would make sure you know which files are lingering, and maybe
share that information here to get improved advice.

Are they application created files? If so, then the application should
manage the lifetime of those files itself.

If they are Tomcat files, then it should clean them up when it exits, and
you shouldn't need to worry about them -- although, there is always the
possibility of a bug somewhere, so identifying the files being left around
would be the first thing to do.

deleteonexit type temporary files would exit when the JVM exits -- which
won't be until Tomcat stops.


> The reason I asked this question is that post us enabling this task we
> could see an increase CPU usage with JVM waits on compilation happening and
> we cant corelate it to this task but that was the only change before the
> problem started.
>

JSP compilation? Are you able to confirm what compliation you are referring
to?



>
> -----Original Message-----
> From: Mark Thomas <ma...@apache.org>
> Sent: Friday, February 7, 2025 3:42 AM
> To: users@tomcat.apache.org
> Subject: Re: Reg: Tomcat temp file deletion
>
> Attention! - This email has originated from an External Source outside of
> eClinicalWorks. Always use caution when opening attachments, clicking
> links, or when responding to this email. If you feel this is a phishing
> scam, please use the Phish Alert Report button in Outlook.
>
>
> On 06/02/2025 19:25, Jalaj Asher wrote:
> > Hello,
> > Is it ok to delete files from tomcat/temp folder  while the tomcat is
> running ?
>
> Generally, no. There are instances where that will break things.
>
> It may be possible to delete some files safely - although that begs the
> question why isn't Tomcat deleting them itself once they are no longer
> needed.
>
> > It required to restart the tomcats post deletion of the files in
> tomcat/temp folder  or should it be deleted only post stopping the tomcat
> service ?
>
> The safe way is:
> - stop Tomcat
> - empty temp
> - start Tomcat
>
> Mark
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>
> CONFIDENTIALITY NOTICE TO RECIPIENT: This transmission contains
> confidential information belonging to the sender that is legally privileged
> and proprietary and may be subject to protection under the law, including
> the Health Insurance Portability and Accountability Act (HIPAA). If you are
> not the intended recipient of this e-mail, you are prohibited from sharing,
> copying, or otherwise using or disclosing its contents. If you have
> received this e-mail in error, please notify the sender immediately by
> reply e-mail and permanently delete this e-mail and any attachments without
> reading, forwarding or saving them. Thank you.
>
> CONFIDENTIALITY NOTICE TO RECIPIENT: This transmission contains
> confidential information belonging to the sender that is legally privileged
> and proprietary and may be subject to protection under the law, including
> the Health Insurance Portability and Accountability Act (HIPAA). If you are
> not the intended recipient of this e-mail, you are prohibited from sharing,
> copying, or otherwise using or disclosing its contents. If you have
> received this e-mail in error, please notify the sender immediately by
> reply e-mail and permanently delete this e-mail and any attachments without
> reading, forwarding or saving them. Thank you.
>

Reply via email to