Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-19-2007, 04:12 PM
Member
 
Join Date: Dec 2007
Posts: 1
amamare is on a distinguished road
Files not completely deleted on Linux
I have an application consisting of three web applications running on JBoss 1.4.2 on a Linux Redhat server. I'm using Solr/Lucene to create and maintain a frequently updated index. Once updated, the index is copied to another directory used for searching. Old index-files in the search directory are then deleted. The streams used to copy the files are closed in finally-blocks. After a few days an IOException occurs because of "too many open files". When I run the linux command

ls -l /proc/26788/fd/

where 26788 is jboss' process id, it gives me a seemingly ever-increasing list of deleted files, marked with 'deleted' in parantheses. They are all located in the search directory. From what I understand this means that something still holds a reference to the file, and that the file will be permanently deleted once this something loses its reference to it.

Only SolrIndexSearcher objects are in direct contact with these files in the search application. The searchers are local objects in search-methods, and are closed after every search operation. In theory, the garbage collector should collect these objects later (though while profiling other applications I've noticed that it often doesn't garbage collect until the allocated memory starts running out).

The other objects in contact with the files are the FileOutputStreams used to copy them, but as stated above, these are closed in finally-blocks and thus should hold no reference to the files.

I need to get rid of the "too many open files"-problem. I suspect that it is related to the almost-deleted files in the proc-dir, but I know too little of Linux to be sure. Does the problem ring a bell to anyone, or do you have any ideas as to how I can get rid of the problem?

All help is greatly appreciated.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows Linux conflict - TrayIcon image not display in Linux Eranga Advanced Java 0 03-25-2008 07:37 AM
Text and image files within jar files erhart Advanced Java 8 01-19-2008 06:43 AM
I am completely stuck jpnym15 New To Java 2 11-14-2007 08:40 PM
how to convert mpeg files to .wav files christina New To Java 1 08-06-2007 06:14 AM
Linux and java Alan Advanced Java 2 05-31-2007 04:30 PM


All times are GMT +3. The time now is 02:14 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org