Connection Timed Out Occasionally using PHP Client

Hi,

I have ES 7.6.2 installed on my AWS EC2 Ubuntu instance and it was working perfectly fine from months. Today i updated some security Ubuntu packages and after that the PHP client is getting timed out in most of the cases.

Please note that i am able to connect every-time via Curl & Kibana which are residing on that same server.

Elastic search is configured on localhost.

The strange part is that almost 10% of hits getting successful connection but fails 90% and gets timed out when trying using PHP client.

All requests via CURL & Kibana successfully connected every-time.

Not sure what has changed after those security updates on EC2

Can anyone please help?

Thanks

Finally i have been able to fix it.

The culprit was Extended Host Configuration. I was using host configuration as follows:

'hosts' => [
'hosts' => 'localhost',
'port' => '9200',
],

Which is breaking in 90% cases. Not sure why it has stopped working suddenly because it was working from months.

Anyways i just changed it to use like below and it is working perfectly again.

'hosts' => ['localhost:9200']

Thanks

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