a long script may have endless connection error in sniffConnecitonPoll state.
Code snippet of problem
my code is here. when the script run a while when all the server state is alive., the shut down the one of the hosts. then the script will always print ""cURL error 28: Connection timed out after xxxx milliseconds"
the problem is when the server is down, then it clear the sniff wait time. next time it will go in sniffConnection method with the failed the connection. but because the unhandled the exception below in the code, it will failed to update the $this->connections. it will continue try the failed the connection forever.
Summary of problem or feature request
a long script may have endless connection error in sniffConnecitonPoll state.
Code snippet of problem
my code is here. when the script run a while when all the server state is alive., the shut down the one of the hosts. then the script will always print ""cURL error 28: Connection timed out after xxxx milliseconds"
the problem is when the server is down, then it clear the sniff wait time. next time it will go in
sniffConnection
method with the failed the connection. but because the unhandled the exception below in the code, it will failed to update the$this->connections
. it will continue try the failed the connection forever.https://github.com/elastic/elasticsearch-php/blob/8f8cdfbe64cd6365692a5b7b4fea4639ad5b0843/src/Elasticsearch/ConnectionPool/SniffingConnectionPool.php#L120
System details
PR submitted https://github.com/elastic/elasticsearch-php/pull/1059