Elasticsearch-php slow connexion

Hello !

I have some latence problems with the php client.

On local, when i perform the "$client->search($params)", my webpage will show around 250ms but on my server it's around 5s.

Without the line "$client->search($params)", my server webpage show in 215ms.
When i use the verbose mode in the client in the production server, this is the return :

'total_time' => 0.059352000000000002,
'namelookup_time' => 3.8999999999999999E-5,
'connect_time' => 0.00031599999999999998,
'pretransfer_time' => 0.00036200000000000002,
'size_upload' => 574.0,
'size_download' => 309511.0,
'speed_download' => 5214836.0,
'speed_upload' => 9671.0,
'download_content_length' => 309511.0,
'upload_content_length' => 574.0,

The request is fast (0.05s), i guess the problem is when elasticsearch send back the data, but i dont know why.
If i query from local to the Es server, i have no latence.
But the latence happen when i query from the production server to the Es server.

I have one server who host the website and another one who host Es.
My clusther had 3 nodes with one shards and one replicas per nodes.
My CPU usage for the 3 nodes are under 2% and for the JVM memory it's under 20%.

I read this this, this and this, still old topic but better than nothing.
I tried to change the Guzzle Connection with the defaultHandler, multiHandler and singleHandler but no change.
I tried tu put the TCP_NODELAY but no change either.

I'm still investigating on the libcurl and the transfert between my servers but i don't see any issues.

Someone had latence issue with the elasticsearch-php client ? Or simply latence on simple query ?

Thanks in advance for reading :smiley:

Up.

No ideas ?

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