tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chad Kellerman" <>
Subject Re: Tomcat JVM not releasing deleted files (lsof show delete inodes taking up disk space)
Date Fri, 03 Oct 2008 12:13:03 GMT
It's actually a vendor supplied application.  I filed a bug/support request
and they returned with a patch.

I guess I was wondering if there were any jvm startup options I may have
over looked that may help with this sort of issues.  But it definitely seems
to be a coding issue.


On Thu, Oct 2, 2008 at 2:27 PM, Christopher Schultz <> wrote:

> Hash: SHA1
> Chad,
> Chad Kellerman wrote:
> > To get a better understanding... the application indexes
> > uploaded files, the indexing process creates the temporary files then
> > removes them.
> Can you share the code that actually does this? The javadoc for
> File.createTempFile states:
> "To arrange for a file created by this method to be deleted
> automatically, use the deleteOnExit() method."
> If your engineers followed this advice, this may be your problem: the
> JVM is waiting until JVM shutdown to actually delete the files. Even if
> the code does an explicit File.delete(), the JVM is probably still
> hanging onto a reference to the file's directory entry in order to
> delete it on exit. That seems like a plausible explanation for why the
> files are marked as "deleted" in lsof, but are still being kept alive by
> the JVM.
> The solution here would be to simply not use File.deleteOnExit; instead,
> use File.delete explicitly.
> - -chris
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla -
> iEYEARECAAYFAkjlEpIACgkQ9CaO5/Lv0PBo0wCfRhUitB/6/pxDQiGtbdo0Ctwk
> qj4AnjuQwMY3yduWoAN5/InlbZnX1CW6
> =i6Uc
> ---------------------------------------------------------------------
> To start a new topic, e-mail:
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message