tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johnny Kewl" <j...@kewlstuff.co.za>
Subject Re: Tomcat JVM not releasing deleted files (lsof show delete inodes taking up disk space)
Date Mon, 29 Sep 2008 16:42:14 GMT

----- Original Message ----- 
From: "Chad Kellerman" <sunckell@gmail.com>
To: <users@tomcat.apache.org>
Sent: Monday, September 29, 2008 4:39 PM
Subject: Tomcat JVM not releasing deleted files (lsof show delete inodes 
taking up disk space)


> Tomcat Users,
>
> Just wondering if anyone else has run into this problem.
>
> First let's get the specifics out of the way:
>
> Tomcat: 5.5.25
> Java:  Sun JDK 1.5.0_13
> Linux RHEL 5
>
> The Tomcat server is situated on it's own file system, with the 
> applications
> on another.  I got a page this weekend, saying that the disk space was at
> 95% on the application file system.  Yet when I did a 'du' on the
> directories, it only showed about 4% used.  But when I did a lsof I saw 
> the
> rest of the used files in a "(deleted)" state.  I tried a 'sync' to see if
> that would write the changes to disk, but the files were still listed as
> "deleted" and the disk space (df) was still at 95%.  I had to resort to
> restarting the tomcat server.  Everything freed up and the disk usage was
> back to normal.  To get a better understanding... the application indexes
> uploaded files, the indexing process creates the temporary files then
> removes them.
>
> I am wondering if anyone has seen this before (on Tomcat, I've seen this
> with databases where the only this to do is restart the server, but never
> with Tomcat) and what they have done to help alleviate the issue.
>
>
> Thanks,
> -- sunckell

Chad, not sure my linux is really stale now, but I think you have answered 
it... the code is not releasing the file.
Something like you up load the file, start the index in a thread, it deletes 
the file, but the thread is still holding a ref to the original file 
handle... the app is holding the file open somewhere.
If you have a windows dev box around, get someone to run it from there... XP 
gets really upset if that happens and you'll probably find it.

You disk usage is skew because linux is reporting that space available... 
but it cant let the file go, because something in the code is hanging on.

... I think... hope its your code ;)

---------------------------------------------------------------------------
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---------------------------------------------------------------------------






---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message