New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 804285 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Unable to create large blobs on Android, breaking at 60MB

Reported by filippo....@geopal-solutions.com, Jan 22 2018

Issue description

Steps to reproduce the problem:
The issue is the limitation of 1% of physical memory when attempting to upload a Blob using FormData and XMLHttpRequest.
Such limitation on modern smartphones, often with RAM amount comparable to that of PCs, doesn't make much sense and ends up preventing some legitimate uses.
As this is a Chromium limitation specific to Android not shared by other browsers or even by Chrome itself when used on other operating systems, it would be nice to either harmonise it with the other builds (limit of 20%) or provide some proprietary JavaScript hook to get rid of it.

What is the expected behavior?
Expected behaviour is no error regardless of the file size or, at least, only when physical memory is actually too low to continue rather than guesstimating that 1% is too much.

What went wrong?
When uploading using XMLHttpRequest a misleading ERR_FILE_NOT_FOUND error is thrown, caused by a 1% of physical memory limit on Chrome for Android, which has no match on other Chrome builds, which in fact have much higher limits.

Did this work before? No 

Does this work in other browsers? Yes

Chrome version: 63.0.3239.132  Channel: stable
OS Version: Any
Flash Version:
 
Components: Blink>Network>XHR
Cc: tyoshino@chromium.org
Components: -Blink>Network>XHR Blink>Storage
Owner: dmu...@chromium.org
It looks it's about the limit on the size of Blobs, not specific to XHR.

https://cs.chromium.org/chromium/src/storage/browser/blob/blob_memory_controller.cc

dmurph@, what do you think about the suggestion?

Comment 3 by dmu...@chromium.org, Jan 25 2018

Cc: ssid@chromium.org
The blob system actually uses disk if your data is > the memory limit, with a limit of 6% of the disk space.

+ssid who fine-tuned the Android limits.

What file sizes are you looking to upload? What is the use case here?
The use case is uploading a high-quality video on an API that doesn't allow splitting the file in multiple parts for upload from within a Cordova app targeting Android 5.0 and above.

On a device with android 7.0, 2GB of RAM and about 10GB of free storage space I can apparently upload 10MiB but not 60MiB. I didn't try with intermediate values as given the limits described above I would have assumed no problem until roughly 620MiB.

From what I saw in the sourcecode when I checked (the same linked above) the Blob "can" use disk space if disk_enabled is set to true. At the time I guessed that disk_enabled is set to false on certain smartphones for some reason (wear, possibly?).

Comment 5 by jsb...@chromium.org, Jan 29 2018

Status: Assigned (was: Unconfirmed)
Cc: dmu...@chromium.org
Owner: ----
Status: Available (was: Assigned)
Summary: Unable to create large blobs on Android, breaking at 60MB (was: Feature request: allow to increase 1% limit on XMLHttpRequest Blob file uploads)
Updating description, marking as available.

Sign in to add a comment