[jira] [Updated] (VFS-472) WebDav runs out of memory when dealing with large files

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[jira] [Updated] (VFS-472) WebDav runs out of memory when dealing with large files

David Costanzo (Jira)

     [ https://issues.apache.org/jira/browse/VFS-472?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Kordes updated VFS-472:

    Attachment: patch_WebdavFileObject_v2_revision-1459279.diff

We came across a bug in our own solution. Since a buffered output stream is used, not all data is on the piped output stream when closing the piped streams.
We added a latch to wait until all streams are closed.

> WebDav runs out of memory when dealing with large files
> -------------------------------------------------------
>                 Key: VFS-472
>                 URL: https://issues.apache.org/jira/browse/VFS-472
>             Project: Commons VFS
>          Issue Type: Improvement
>    Affects Versions: 2.0
>         Environment: Any
>            Reporter: Stefan Kordes
>              Labels: bytearrayoutputstream, outofmemory, webdav
>         Attachments: patch_WebdavFileObject_revision-1459279.txt, patch_WebdavFileObject_v2_revision-1459279.diff
> When copying or moving large files from any protocol to webdav, an OutOfMemoryException is thrown.
> This is because the WebDavOutputStream uses a ByteArrayOutputStream to store the data before sending.
> We have created a patch for the latest version that uses a PipedOutputStream and a InputStreamRequestEntity to prevent that.
> This issues has been reported before as VFS-47

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira