DownloadFailedException: Failed to download from:

Hello,
I’m having this recurrent problem with a FIS request in Hungary. I tried not to download some of the data, but it seems there is a lot that is missing or failing because I keep getting this error:

DownloadFailedException: Failed to download from:
https://services.sentinel-hub.com/ogc/fis/ [Instance ID]
with HTTPError:
500 Server Error: Internal Server Error for url: https://services.sentinel-hub.com/ogc/fis/ [Instance ID]

Server response: “java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: newLimit > capacity: (4362 > 4359)”

Would you be able to help me with this?
Thanks in advance!

Hi @pilar.endara,
in order to identify the error we need to be able to replicate the request.
Can you send an example of the request that is failing? You can mask the instance iD out, but the rest should be there.
Thanks,
Grega

Hello,
this is what I get returned:

return[B04,B08,SCL,B11,B03]
17.123114457016502,47.6589057897476,17.123204288544915,47.658966295094004
0.6
{
  "instance_id": "",
  "sh_client_id": "",
  "sh_client_secret": "",
  "sh_base_url": "https://services.sentinel-hub.com",
  "geopedia_wms_url": "https://service.geopedia.world",
  "geopedia_rest_url": "https://www.geopedia.world/rest",
  "aws_access_key_id": "",
  "aws_secret_access_key": "",
  "aws_metadata_url": "https://roda.sentinel-hub.com",
  "aws_s3_l1c_bucket": "sentinel-s2-l1c",
  "aws_s3_l2a_bucket": "sentinel-s2-l2a",
  "opensearch_url": "http://opensearch.sentinel-hub.com/resto/api/collections/Sentinel2",
  "max_wfs_records_per_query": 100,
  "max_opensearch_records_per_query": 500,
  "max_download_attempts": 4,
  "download_sleep_time": 5,
  "download_timeout_seconds": 120,
  "number_of_download_processes": 1
}
return[B04,B08,SCL,B11,B03]

there might be other errors later on as well… I’m not sure if this is actually the right info, let me know if this works or not

I got it with this code:
from sentinelhub import FisRequest, BBox, CRS, CustomUrlParam, SHConfig

    INSTANCE_ID = ''
    if INSTANCE_ID:
        config = SHConfig()
        config.instance_id = INSTANCE_ID
    else:
        config = None

    bbox = BBox([17.123114457016502,47.6589057897476,17.123204288544915,47.658966295094004], crs=CRS('4326'))
    time_interval = ('2017-06-11', '2020-07-20')
    eval_script = 'return[B04,B08,SCL,B11,B03]'

    fis_request = FisRequest(
        layer='BANDS-S2-L2A',
        geometry_list=[bbox],
        time=time_interval,
        maxcc=0.6,
        resolution='10m',
        config=config,
        custom_url_params={CustomUrlParam.EVALSCRIPT: eval_script},
    )
    fis_data = fis_request.get_data()

Hi @pilar.endara

If the problem persists, try splitting your temporal interval. The code you posted works for me if I shorten the time_interval; but I did not try the whole time_interval you define, so the issue might be there.

I’d also suggest you try out the new StatAPI, which supersedes the FIS, and is much more robust with providing better functionality and capabilities. It is already available through sentinelhub-py, see for instance an example in the docs.

Best,
Matej

HI @pilar.endara ,

the exemplary requests have been solved (problems with underlying data, which happens sporadically).

I hope that the rest go through as well. If not, please send us the examples.

Best,
Grega