jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Guggisberg <stefan.guggisb...@gmail.com>
Subject Re: no space left on device-exception by Property.getStream()
Date Fri, 12 Apr 2013 08:13:51 GMT
On Fri, Apr 12, 2013 at 12:21 AM, Ulrich <Forums@gombers.de> wrote:
> While retrieving lots of data in a loop from several nt:file nodes I always get a "no
space left on device"-exception. The code is:
> Node filenode = Node.getNode("jcr:content");
> Property jcrdata = filenode.getProperty("jcr:data");
> InputStream is = jcrdata.getBinary().getStream();
> It seems that the InputStream is buffered somewhere for the current session and that
the total buffer size for a session is limited. Is this true and if so, how can I control
this size? Or is there an opportunity to free the space? I can probably close my session and
open a new one but I would need to change the logic of my program,
> Any hint is very welcome.

larger binaries are buffered in temp files on read (smaller ones are
buffered in-mem).
therefore, reading a lot of binaries concurrently will result in a lot
of temp files.
those temp files will go away once they're not referenced anymore.
your obviously running out of disk space.

the following should help:

1. make sure you close the input stream as early as possible
2. if this is a specific job you're running (such as e.g. an export) you could
    try forcing gc cycles in between
3. increase your disk space


> Ulrich

View raw message