Open jasonfish568 opened 1 week ago
Hey @jasonfish568, this package uses elasticsearch-php under the hood and the client is initialized from the configuration hash as described here.
I can recommend you try a few things:
ElasticsearchResurrect
option for the node pool (see the documentation).This means your config file would look similar to:
return [
'default' => env('ELASTIC_CONNECTION', 'default'),
'connections' => [
'default' => [
'hosts' => [
env('ELASTIC_HOST', 'localhost:9200'),
],
'httpClientOptions' => [
'timeout' => 2,
'headers' => [
'Authorization' => 'ApiKey ' . env('ELASTIC_API_KEY'),
],
],
'retries' => 10,
'nodePool' => new SimpleNodePool(new RoundRobin(), new ElasticsearchResurrect()),
],
],
];
Please note that you have complete control over the client creation: you can use the config file, or create your own client builder as described here.
I hope this helps 🙂
Thanks so much for the information. Let me further investigate. I think the resurrect might be the solution.
Describe the bug Thanks for providing this package. However I encoutered an error that I don't know how to solve. Hope you could direct me to the right way.
My app keeps getting this error randomly. I have an instance deployed on Elastic.co.
Initially thought it was the instance is too small so I upgraded. But still seeing this error randomly. Sometimes it happens with search operation. Initially thought it was caused by syncing 600k records. I have a dedicated queue worker running scout sync jobs. But 600k shouldn't cause such error otherwise ES is a total failure comparing to Algolia.
I reached to Elastic.co's support. They mentioned:
After checking the code, I found out that:
I only have one URL from Elastic.co. But my deployment is running in 2 zones so more than 2 nodes. This ELASTIC_HOST only provided one node to the config. Could this be a reason? But still, I am very confused why this error happens at all.
To Reproduce Unable to reproduce. Usually happens when syncing 600k records.