Temporal analysis 504 and 502 error

Hi, I am using Playground with custom scripts for temporal analysis and I am getting constantly 504, 502 error, is there any problem on the infrastructure site or are you blocking the use of temporal option because of heavy load?

Thanks

It might be that your scripts are too heavy for what this system was designed for. Can you share what you are trying to do?

I am trying to run the s2gm script in Playground, I have modified just the setup and evaluate function so it does not produce multipart outputs I was hoping that this could work, rest of the code is untouched.

function setup(ds) {
    setInputComponents([ds.B01, ds.B02, ds.B03, ds.B04, ds.B05, ds.B06, ds.B07, ds.B08, ds.B8A, 
ds.B11, ds.B12,
            ds.AOT, ds.CLD, ds.SNW, ds.SCL, ds.viewZenithMean, ds.viewAzimuthMean, 
ds.sunZenithAngles, ds.sunAzimuthAngles]);
    setOutputComponentCount(3);
}

function evaluatePixel(samples, scenes) {
    var filteredSamples = filterByOrbitId(samples, scenes);
    var best = selectRepresentativeSample(filteredSamples);
    if (best === undefined) {
        return [0, 0, 0];
    } else {
        var bestSample = best.sample;
        var mos;
        var sampleIndex = samples.indexOf(bestSample);
        if (isNaN(best.mos)) {
            mos = 65535;
        } else {
            mos = best.mos * 10000;
        }
        return [bestSample.B04 * 10000,
                bestSample.B03 * 10000,
                bestSample.B02 * 10000
            ];
    }
}

There are several (possible) reasons, why this does not work:
-the http calls are usually limited to 2.000 (or 4.000) chars (see this for more details) and what you do here is more than that (you could avoid this by using “use URL” option).
-this version of Sentinel Playground executes requests starting on 2015-01-01 so if you use it on “today”, you will ask the service to process 4 years of data, which will almost certainly result in a timeout as it was not designed for this (we are developing an API to allow it, stay tuned)

We recommend you try the API (https://docs.sentinel-hub.com/api/latest/) and start with shorter time periods (e.g. 3 months) and small tiles (e.g. 100x100 px). Then go from there further.