I am new in GEE.

I am trying to reduce a mean statistics over an image with reduceRegions. I increased tileScale to 16 (max value possible), decreased the number of polygons, exported to asset for performing long running operations, and the error 'User memory limit exceeded' kept appearing.

Than, I found (https://developers.google.com/earth-engine/debugging?hl=en#reduceregion-vs.-reduceregions) map a reduceRegion function divides work into smaller tasks. I set bestEffort as true and maxPixel parameter. But still the error keeps appearing. The scale is the only thing I would like to keep, 10 m of res.

The code works if I run it for two polygons but when the number increases I get the error. Do you have any advise?

Here is the link of my script: https://code.earthengine.google.com/e1e80f9ca804651b6c1b3a3614d7e483

  • In a completely different script, that previously worked perfectly, I'm having the same error. "User memory limit exceeded". This all started Feb 29th... Leap year issue? Mar 1, 2020 at 21:39

1 Answer 1


Your merged_image is probably causing you trouble. It contains 900+ bands, and will require a lot of memory to process. You're probably better off running reduceRegion() or reduceRegions() on the individual images and then merging the result somehow. Maybe something like this:

var oneclassplys = buff.filterMetadata('GWS_GEWAS', 'equals', oneclass)
  .map(function (polygon) {
    return s1_s2_IC.map(function (image) {
      return regionmean(polygon, image)
  • Thanks Daniel, your solution is not running out of memory but i am finding very difficult to merge all properties of all intersected polygons of the same feature collection. i keep this question open. Maybe it is possible with a join or an iteration over the feature collection? my goal is to have a list of polygon with all 933 properties.
    – beatrice
    Mar 6, 2020 at 22:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.