Sometimes elasticsearch shuts down with “No alive nodes found in your cluster” error

Elasticsearch turns off some time after launch, and it’s solved by relaunching, I need to do something with it. I got next error:

Exception #0 (Elasticsearch\Common\Exceptions\NoNodesAvailableException): No alive nodes found in your cluster  Exception #0 (Elasticsearch\Common\Exceptions\NoNodesAvailableException): No alive nodes found in your cluster <pre>#1 Elasticsearch\Transport->getConnection() called at [vendor/elasticsearch/elasticsearch/src/Elasticsearch/Transport.php:94] #2 Elasticsearch\Transport->performRequest() called at [vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php:246] #3 Elasticsearch\Connections\Connection->Elasticsearch\Connections\{closure}() called at [vendor/react/promise/src/FulfilledPromise.php:25] #4 React\Promise\FulfilledPromise->then() called at [vendor/guzzlehttp/ringphp/src/Future/CompletedFutureValue.php:55] #5 GuzzleHttp\Ring\Future\CompletedFutureValue->then() called at [vendor/guzzlehttp/ringphp/src/Core.php:341] #6 GuzzleHttp\Ring\Core::proxy() called at [vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php:299] #7 Elasticsearch\Connections\Connection->Elasticsearch\Connections\{closure}() called at [vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php:177] #8 Elasticsearch\Connections\Connection->performRequest() called at [vendor/elasticsearch/elasticsearch/src/Elasticsearch/Transport.php:110] #9 Elasticsearch\Transport->performRequest() called at [vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/BooleanRequestWrapper.php:38] #10 Elasticsearch\Namespaces\BooleanRequestWrapper::performRequest() called at [vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/IndicesNamespace.php:38] #11 Elasticsearch\Namespaces\IndicesNamespace->exists() called at [vendor/smile/elasticsuite/src/module-elasticsuite-core/Client/Client.php:84] #12 Smile\ElasticsuiteCore\Client\Client->indexExists() called at [vendor/smile/elasticsuite/src/module-elasticsuite-core/Index/IndexOperation.php:102] #13 Smile\ElasticsuiteCore\Index\IndexOperation->indexExists() called at [vendor/smile/elasticsuite/src/module-elasticsuite-core/Index/IndexOperation.php:116] #14 Smile\ElasticsuiteCore\Index\IndexOperation->getIndexByName() called at [vendor/smile/elasticsuite/src/module-elasticsuite-core/Search/Request/ContainerConfiguration.php:186] #15 Smile\ElasticsuiteCore\Search\Request\ContainerConfiguration->getIndex() called at [vendor/smile/elasticsuite/src/module-elasticsuite-core/Search/Request/ContainerConfiguration.php:94] #16 Smile\ElasticsuiteCore\Search\Request\ContainerConfiguration->getIndexName() called at [generated/code/Smile/ElasticsuiteCore/Search/Request/ContainerConfiguration/Interceptor.php:37] #17 Smile\ElasticsuiteCore\Search\Request\ContainerConfiguration\Interceptor->getIndexName() called at [vendor/smile/elasticsuite/src/module-elasticsuite-core/Search/Request/Builder.php:151] #18 Smile\ElasticsuiteCore\Search\Request\Builder->create() called at [vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Model/ResourceModel/Product/Fulltext/Collection.php:635] #19 Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection->loadProductCounts() called at [vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Model/ResourceModel/Product/Fulltext/Collection.php:195] #20 Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection->getSize() called at [generated/code/Smile/ElasticsuiteCatalog/Model/ResourceModel/Product/Fulltext/Collection/Interceptor.php:24] #21 Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection\Interceptor->getSize() called at [vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Model/Layer/RelevantFilterList.php:69] #22 Smile\ElasticsuiteCatalog\Model\Layer\RelevantFilterList->getCoverageRates() called at [vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Model/Layer/RelevantFilterList.php:37] #23 Smile\ElasticsuiteCatalog\Model\Layer\RelevantFilterList->getRelevantFilters() called at [vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Block/Navigation.php:186] #24 Smile\ElasticsuiteCatalog\Block\Navigation->addFacets() called at [vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Block/Navigation.php:174] #25 Smile\ElasticsuiteCatalog\Block\Navigation->_prepareLayout() called at [vendor/magento/framework/View/Element/AbstractBlock.php:273] #26 Magento\Framework\View\Element\AbstractBlock->setLayout() called at [vendor/magento/framework/View/Layout/Generator/Block.php:149] #27 Magento\Framework\View\Layout\Generator\Block->process() called at [vendor/magento/framework/View/Layout/GeneratorPool.php:81]