You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Narayanan Arunachalam (Created) (JIRA)" <ji...@apache.org> on 2011/10/28 21:43:32 UTC
[jira] [Created] (CXF-3889) OOM when uploading files greater than
2GB
OOM when uploading files greater than 2GB
-----------------------------------------
Key: CXF-3889
URL: https://issues.apache.org/jira/browse/CXF-3889
Project: CXF
Issue Type: Bug
Components: Core
Affects Versions: 2.4.3
Environment: All environments
Reporter: Narayanan Arunachalam
The totalLength field in org.apache.cxf.io.CachedOutputStream is declared as a int field, so when a file greater than 2GB is uploaded for a PUT operation, OOM is thrown.
When the file size is over 2GB the condition 'totalLength < limit' becomes true when it should not.
public void writeCacheTo(StringBuilder out, String charsetName, int limit) throws IOException {
294 flush();
295 if (totalLength < limit
296 || limit == -1) {
297 writeCacheTo(out);
298 return;
299 }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CXF-3889) OOM when uploading files greater than
2GB
Posted by "Narayanan Arunachalam (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13142854#comment-13142854 ]
Narayanan Arunachalam commented on CXF-3889:
--------------------------------------------
How about not writing the payload to the log if the content type is of type "application/octet-stream". Right now first 100k is written to the log.
> OOM when uploading files greater than 2GB
> -----------------------------------------
>
> Key: CXF-3889
> URL: https://issues.apache.org/jira/browse/CXF-3889
> Project: CXF
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.4.3
> Environment: All environments
> Reporter: Narayanan Arunachalam
> Assignee: Daniel Kulp
> Fix For: 2.5
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> The totalLength field in org.apache.cxf.io.CachedOutputStream is declared as a int field, so when a file greater than 2GB is uploaded for a PUT operation, OOM is thrown.
> When the file size is over 2GB the condition 'totalLength < limit' becomes true when it should not.
> public void writeCacheTo(StringBuilder out, String charsetName, int limit) throws IOException {
> 294 flush();
> 295 if (totalLength < limit
> 296 || limit == -1) {
> 297 writeCacheTo(out);
> 298 return;
> 299 }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CXF-3889) OOM when uploading files greater than
2GB
Posted by "Daniel Kulp (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Kulp resolved CXF-3889.
------------------------------
Resolution: Fixed
Fix Version/s: 2.5
Assignee: Daniel Kulp
Fixed for 2.5.
As it changes the type of the getSize() method, not something that can be backported to 2.4.x as it's an API change.
> OOM when uploading files greater than 2GB
> -----------------------------------------
>
> Key: CXF-3889
> URL: https://issues.apache.org/jira/browse/CXF-3889
> Project: CXF
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.4.3
> Environment: All environments
> Reporter: Narayanan Arunachalam
> Assignee: Daniel Kulp
> Fix For: 2.5
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> The totalLength field in org.apache.cxf.io.CachedOutputStream is declared as a int field, so when a file greater than 2GB is uploaded for a PUT operation, OOM is thrown.
> When the file size is over 2GB the condition 'totalLength < limit' becomes true when it should not.
> public void writeCacheTo(StringBuilder out, String charsetName, int limit) throws IOException {
> 294 flush();
> 295 if (totalLength < limit
> 296 || limit == -1) {
> 297 writeCacheTo(out);
> 298 return;
> 299 }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira