elasticsearch python client - work with many nodes - how to work with sniffer
You need to set sniff_timeout
to a higher value than the default value (which is 0.1 if memory serves).
Try it like this
es = Elasticsearch( ['esnode1', 'esnode2'], # sniff before doing anything sniff_on_start=True, # refresh nodes after a node fails to respond sniff_on_connection_fail=True, # and also every 60 seconds sniffer_timeout=60, # set sniffing request timeout to 10 seconds sniff_timeout=10)