opensearch_adapter = HTTPAdapter(max_retries=retries)
with requests.Session() as session:
session.mount('http://opensearch-test.ceda.ac.uk', opensearch_adapter)
session.get(url) # multiple times, startPage incrementing until I get all files
Here is the output: Important part in red : Any ideas?
If I try to catch a KeyError, then the call passes. The calls which 500 take longer than the successful calls, so I wonder if it is a timeout in the elasticsearch layer which means the _source does not contain an info key. Look into handling timeouts in the ES layer.
I get an intermittent 500 when trying this flow and it reports KeyError: No key 'info' https://github.com/cedadev/archive-opensearch/blob/f8b8813961d3b0d1017420f8a62511c7b945577a/django_opensearch/opensearch/backends/elasticsearch/facets/cci.py#L90
If I try to catch a KeyError, then the call passes. The calls which 500 take longer than the successful calls, so I wonder if it is a timeout in the elasticsearch layer which means the
_source
does not contain aninfo
key. Look into handling timeouts in the ES layer.