On Tue, Nov 18, 2014 at 05:27:48PM -0300, felipe gutierrez wrote:
> time ago I asked here why I am getting "too many files open" with jclouds
> and the answer was I needed to close my BlobStoreContext. I did but now I
> am getting this error again. I believe the context is opening in other
> location. This is my code <http://pastebin.com/xCMMMqFR>. I close the
> context at lines 175 and 508. Maybe I have to close other objects. But I am
> still getting the error:
> 
> Caused by: java.io.FileNotFoundException:
> /home/felipe/udrive/disks/storage/bench53473ResourcegraveISCSI9284/355 (Too
> many files open)

Try closing the results of bloblgetPayload().getInput() (lines 428 and
431).  You can do this via Java 7 try-with-resources or with
ByteStreams2.toByteArrayAndClose.  These InputStream are actually
FileInputStream and likely the cause of your leaks.

-- 
Andrew Gaul
http://gaul.org/

Reply via email to