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.

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.


-----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