[
https://jira.nuxeo.com/browse/NXP-7934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=106637#comment-106637
]
Stéphane Lacoin edited comment on NXP-7934 at 11/28/11 11:35 AM:
-----------------------------------------------------------------
The {{javax.mail.internet.MimeMultipart.MimeMultipart}} is buffering the input
in memory if the provided stream does not implement the
{{javax.mail.internet.SharedInputStream}}. We've tried to use the provided
{{javax.mail.util.SharedFileInputStream}} implementation. But we've got errors
related to the data filling logic (ie: exception thrown when trying to fill
buffer largest than the actual data).
The solution was to provide our own implementation of that class.
We've also introduced the {{UploadBigFileTest}} test case that upload a blob
largest that the memory allocated to the JVM. That test is not run by default
in the suite and is available only in eclipse.
was (Author: slacoin):
The {{javax.mail.internet.MimeMultipart.MimeMultipart}} is buffering the
input in memory if the provided stream does not implement the
{{javax.mail.internet.SharedInputStream}}. We've tried to use the provided
{{javax.mail.util.SharedFileInputStream}} implementation. But we've got errors
related to the data filling logic (ie: exception thrown when trying to fill
buffer largest than the actual data).
The solution was to provide our own implementation of that class.
We've also introduces the {{UploadBigFileTest}} test case that upload a blob
largest that the memory allocated to the JVM. That test is not run by default
in the suite and is available only in eclipse.
> ouf of memory while reading large blob in automation
> ----------------------------------------------------
>
> Key: NXP-7934
> URL: https://jira.nuxeo.com/browse/NXP-7934
> Project: Nuxeo Enterprise Platform
> Issue Type: Bug
> Components: Automation
> Affects Versions: 5.4.1
> Reporter: Stéphane Lacoin
> Assignee: Stéphane Lacoin
> Priority: Major
> Fix For: 5.5
>
>
> When reading large blob in
> {{org.nuxeo.ecm.automation.server.jaxrs.io.MultiPartRequestReader}}, the
> thread is reading into a buffer and may consume all the server memory
> available. We should allocate a {{SharedFileInputStream}} instead of
> {{FileInputStream}}. This will prevent the
> {{javax.mail.internet.MimeMultipart}} to wrap the input stream into a
> {{BuferredInputStream}}.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets