I am testing a object-oriented LULC classification approach in Google Earth Engine, using the code available at the following link: https://code.earthengine.google.com/4032fe102252b285ec249f395d0d6d0f.

The problem here is that the GEE reports this error message:

Layer error: Computation timed out.

I think that I exceeded the maximum number of pixels due to large AOI, because when I clip the AOI to a small area the code works out well.

Is there a way to fix /define the maximum number of input pixels or another way to avoid the Computation timed out?

1 Answer 1


"Computation timed out" literally means that the computation took too much time. It does not refer to any limit on pixel counts or other quantities than time.

If you believe your script is functioning correctly and simply is doing a long computation, then it's time to switch to using Export operations, which are allowed to run for days, to produce images.

  • Thanks, Kevin! But, did you see the script?
    – Hercilo
    Commented Apr 30, 2021 at 13:47
  • @Hercilo Yes, but it's quite long and I didn't see any obvious problems to comment on. Also, here on GIS Stack Exchange, it's expected that answers match questions — you asked specifically about pixel limits and so I answered about them. The reason the site works this way is so that that someone in the future searching for answers can find useful ones — questions and answers are, ideally, general enough to be applicable to many situations more than "please improve this exact code I have".
    – Kevin Reid
    Commented Apr 30, 2021 at 14:45
  • It's fine, @Kevin!
    – Hercilo
    Commented Apr 30, 2021 at 16:38

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.