Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

User Story #462 (closed)

Opened 18 years ago

Closed 16 years ago

Too Many Open Files

Reported by: cxallan Owned by: cxallan
Priority: critical Milestone: 3.0-Beta3.1
Component: Bin-Services Keywords: n.a.
Cc: jamoore, jburel Story Points: n.a.
Sprint: n.a. Importance: n.a.
Total Remaining Time: n.a. Estimated Remaining Time: n.a.

Description

The binary services currently open many files from disk without explicitly closing the file handle. The garbage collector is not able to keep up over time which eventually results in the operating system's "process max file handle count" being exhausted.

Change History (10)

comment:1 Changed 18 years ago by cxallan

  • Resolution set to fixed
  • Status changed from new to closed

Some of this will have been fixed by the thumbnail service changes in r457 but r1069 should stamp out any further occurrences.

comment:2 Changed 17 years ago by cxallan

Further squashing done in r1081. For some reason the PixelBuffer?'s don't seem to be garbage collected correctly and in order to insure that we don't end up with file handle exhaustion I've moved the "close()" closer to the mapped byte buffer retrieval.

comment:3 Changed 17 years ago by cxallan

  • Keywords iteration3 added; iteration6 removed
  • Milestone changed from 3.0-M3 to 3.0-Beta2
  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Version 3.0-M3 deleted

This is still happening intermitantly. It seems to regularly happen on Valewalker:

cxallan@valewalker ~ $ java -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot?(TM) Server VM (build 1.6.0-b105, mixed mode)

comment:4 Changed 17 years ago by jburel

Problem scenario:

For testing, I had to browse michael's datasets (70 thumbnails in total) each time
I repeated the information 4 / 5 times (logged in, logged out)
I browsed the same datasets each time.

The 5th time, some of the thumbnails were not loaded.
Follow the error message

Error message
Caused by: javax.naming.CommunicationException: Failed to retrieve stub from server   valewalker.openmicroscopy.org.uk:1099 [Root exception is java.io.EOFException]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:263)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1385)...
Caused by: java.io.EOFException 
at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2228) at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2694)
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:761)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:277)
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:250)

comment:5 Changed 17 years ago by cxallan

  • Resolution set to fixed
  • Status changed from reopened to closed

Changes in r1557 should resolve this.

comment:6 Changed 17 years ago by cxallan

r1558 plugs another edge case where we can leak file handles.

comment:7 Changed 17 years ago by cxallan

r1559 plugs another edge case where we can leak file handles in the ImageIO logic in the thumbnail bean, this should also increase performance. It appears as though we are in fact leaking memory here as a result of close() not being called on a ByteArrayInputStream.

comment:8 Changed 17 years ago by cxallan

  • Cc jburel added

r1560 deals with the ImageOutputStream that the ImageIO logic uses internally. This should fix the presence of temporary files and also increases performance significantly. Thumbnail retrieval is now approximately 10x faster than before.

comment:9 Changed 16 years ago by cxallan

  • Keywords iteration3 removed
  • Milestone changed from 3.0-Beta2 to 3.0-Beta3.1
  • Resolution fixed deleted
  • Status changed from closed to reopened

This is now evident in milestone:3.0-Beta3.1 projection code.

comment:10 Changed 16 years ago by cxallan

  • Resolution set to fixed
  • Status changed from reopened to closed

Fixed in r2875 in Trunk and r2876 in the milestone:3.0-Beta3.1 branch.

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.67158 sec.)

We're Hiring!