Magento 2 Algolia connection time out issue
-
11-10-2020 - |
Solution
Finally I got the solution for this issue!! The issue was due to my server's slow connection with algolia server. Algolia search by default uses 1s connection timeout, which I increased to 10 seconds, solved my issue.
To change timeout to 10s we need to edit below file by overriding it:
\vendor\algolia\algoliasearch-client-php\src\AlgoliaSearch\ClientContext.php
// connect timeout of 1s by default
$this->connectTimeout = 10;
// global timeout of 30s by default
$this->readTimeout = 30;
// search timeout of 5s by default
$this->searchTimeout = 10;
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange