TransportError(503, 'search_phase_execution_exception') only while using python but not in kibana?

I am using python to extract data from my Elasticsearch but suddenly started to get this error : TransportError(503, 'search_phase_execution_exception'). I also have kibana working with the same Elasticsearch and I am able to execute the same query in devTools.



                "size" : 10000,

                "sort": { "timestamp": "desc"},

                "_source": ["data.service","data.vpn","data.policyid","data.srccountry1","data.srcip","data.dstip","","data.srcuser","data.tunneltype"],


                    "bool": {

                        "must": [

                            {"exists": {"field": "data.service"}},

                            {"exists": {"field": "data.vpn"}},

                            {"exists": {"field": "data.policyid"}},

                            {"exists": {"field": "data.srccountry1"}},

                            {"exists": {"field": "data.srcip"}},

                            {"exists": {"field": "data.dstip"}},

                            {"match_phrase": {"data.action": "accept"}},

                            {"match_phrase": {"location":host }}





es.indices.exists(index=today_index_name): to check if index is there or not.

only 2 queries are being executed by python.
What could be causing this issue? Is this related to SEARCH API which python uses?

Can you share the full exception of the response and also add the error_trace parameter? See Common options | Elasticsearch Guide [8.1] | Elastic

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.