You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Uploading a file with the following code causes the entire file to be loaded in to memory. CloudConvertClient().importUsing().upload(UploadImportRequest(), file)
It looks like the file is being converted in to an input stream in getMultipartHttpEntity.getMultipartHttpEntity(). Because of this, the entire file is being read out into memory in BufferedHttpEntity, as InputStreamBodys have a contentLength of -1.
There's a note that you're using an InputStreamBody and not a FileBody because it causes the async client to fail with ContentTooLongException. If this can't be worked around, it could instead be fixed just for the non-async client?
Below are two images showing the memory spiking, and then being retained, on uploading a 200MB file. The memory is GC'd after the upload has finished.
The text was updated successfully, but these errors were encountered:
Uploading a file with the following code causes the entire file to be loaded in to memory.
CloudConvertClient().importUsing().upload(UploadImportRequest(), file)
It looks like the file is being converted in to an input stream in
getMultipartHttpEntity.getMultipartHttpEntity()
. Because of this, the entire file is being read out into memory inBufferedHttpEntity
, asInputStreamBody
s have a contentLength of -1.There's a note that you're using an
InputStreamBody
and not aFileBody
because it causes the async client to fail withContentTooLongException
. If this can't be worked around, it could instead be fixed just for the non-async client?Below are two images showing the memory spiking, and then being retained, on uploading a 200MB file. The memory is GC'd after the upload has finished.
The text was updated successfully, but these errors were encountered: