Skip to content

Problem with large files #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cyrillef opened this issue May 15, 2018 · 1 comment
Closed

Problem with large files #16

cyrillef opened this issue May 15, 2018 · 1 comment
Assignees
Labels

Comments

@cyrillef
Copy link
Contributor

We got an Out of Memory exception while uploading a large file (2.7GB).
We also tried using the objectAPI.uploadChunk with the same result.
Playing with the Xmx had no effect.
Increasing the instance memory to 16GB didn’t either.
Any ideas?

Here’s the command line:
java -jar autodesk-console.jar –Xmx16000m …

Here’s the stack:
Exception in thread "main" java.lang.OutOfMemoryError: Required array size too large
at java.nio.file.Files.readAllBytes(Files.java:3156)
at com.autodesk.client.ApiClient.getAPIResponse(ApiClient.java:476)
at com.autodesk.client.ApiClient.invokeAPI(ApiClient.java:555)
at com.autodesk.client.api.ObjectsApi.uploadObject(ObjectsApi.java:696)
at com.datumate.autodesk.application.service.handlers.impl.AutodeskBucketHandlerImpl.uploadFile(AutodeskBucketHandlerImpl.java:103)
at com.datumate.autodesk.application.service.UploadTextureModelFlow.uploadFilesToAutodeskS3AndGetUrn(UploadTextureModelFlow.java:98)
at com.datumate.autodesk.application.service.UploadFileFlow.downloadFileFromDatumateS3AndUploadToAutodeskS3(UploadFileFlow.java:19)
at com.datumate.autodesk.application.impl.Menu.handleUserSelection(Menu.java:102)
at com.datumate.autodesk.application.impl.Menu.operate(Menu.java:37)
at com.datumate.autodesk.application.impl.AutodeskApplication.start(AutodeskApplication.java:19)
at com.datumate.autodesk.application.App.main(App.java:22)

The use of java.nio.file.Files.readAllBytes which is called by the AD API. It is not recommended for large files (that’s where the exception happened). The java InputStream API is recommended.

@dukedhx
Copy link
Contributor

dukedhx commented Feb 25, 2019

This has been addressed here

@dukedhx dukedhx closed this as completed Feb 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants