Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
boxer
9 years agoNew member | Level 2
dropbox-core-sdk upload memory issues
I wrote simple app to test upload with dropbox-core-sdk 2.1.2.
It opens stream from a file located at Dropbox
InputStream fileContentStream = getClient().files().download(path).getInputStream();and passes it to upload method (within same account, but should be same even for different accounts):
builder.uploadAndFinish(fileContentStream);
The problem is memory consumption rapidly increases from 5MB to 192MB within 10 s., then app crashes:
I/art: Clamp target GC heap from 207MB to 192MB I/art: HomogeneousSpaceCompact marksweep + semispace GC freed 3(96B) AllocSpace objects, 0(0B) LOS objects, 0% free, 191MB/192MB, paused 624.881ms total 624.881ms W/art: Throwing OutOfMemoryError "Failed to allocate a 12 byte allocation with 3680 free bytes and 3KB until OOM"
File size is 550MB. Allocation trace showing DbxUploadStyleBuilder.uploadAndFinish():92 is the main contributor; it breaks down to com.android.okhttp.okio.SegmentPool.take():46 which is allocating numerous byte[] chunks 12288 each until crash.
Question: am I using the dropbox SDK not properly for uploading of large files or it's an issue with SDK?
1 Reply
- Greg-DB9 years ago
Dropbox Community Moderator
Thanks for the report! We'll look into it. It looks like you also posted this on GitHub, so we'll follow up there once we've reviewed this.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!