Elasticsearch and mariadb services stop sometimes

Type: Suggestion
Description:
elasticsearch and mariadb services stop sometimes. They get up automatically in a few minutes or I do it manually but I need a permanent solution.

i found this errors in log file:

1-main.CRITICAL: Lo sentimos, algo salió mal. Encontrarás más información en el registro de errores. {“report_id”:“5a53758f00c8f6836c7b809a696d29418a204bf7755566fbca48b128872efe73”,“exception”:"[object] (Magento\Framework\Exception\LocalizedException(code: 0): Lo sentimos, algo salió mal. Encontrarás más información en el registro de errores. at /bitnami/magento/app/code/Mageplaza/LayeredNavigation/Model/ResourceModel/Fulltext/Collection.php:500)"} []

(this error i dont know why)

2- main.CRITICAL: No alive nodes found in your cluster {“exception”:"[object] (Elasticsearch\Common\Exceptions\NoNodesAvailableException(code: 0): No alive nodes found in your cluster at /bitnami/magento/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/StaticNoPingConnectionPool.php:50)"} []

(i know this error is when elasticsearch is stopped)

3-main.CRITICAL: Sin identidad con id = 151 {“report_id”:“a159db1bdbeb6bae1fdbd5a54f75249bc8b12e7cf716bfd718c6e05227dab1f5”,“exception”:"[object] (Magento\Framework\Exception\NoSuchEntityException(code: 0): Sin identidad con id = 151 at /bitnami/magento/vendor/magento/framework/Exception/NoSuchEntityException.php:50)"} []

(this happens because magento is looking for a category that no longer exists)

4-main.CRITICAL: The stock item was unable to be saved. Please try again. {“exception”:"[object] (Magento\Framework\Exception\CouldNotSaveException(code: 0): The stock item was unable to be saved. Please try again. at /bitnami/magento/vendor/magento/module-catalog-inventory/Model/Stock/StockItemRepository.php:187, Magento\Framework\Exception\LocalizedException(code: 0): Could not ping search engine: No alive nodes found in your cluster at /bitnami/magento/vendor/magento/module-elasticsearch/Model/Adapter/Elasticsearch.php:166)"} []

(i see this error happens when elasticsearch is stopped)

5-main.CRITICAL: SQLSTATE[HY000] [2002] Connection refused {“report_id”:“1b81cb1bc304cb27c49162710beda39c5b5776967e3451cd02091d3d63a2d063”,“exception”:"[object] (Zend_Db_Adapter_Exception(code: 2002): SQLSTATE[HY000] [2002] Connection refused at /bitnami/magento/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php:144, PDOException(code: 2002): SQLSTATE[HY000] [2002] Connection refused at /bitnami/magento/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php:128)"} []

(this error when mariadb is stopped)

thank you for your help

Hi @erikamartinez93315,

We have a Support Tool that will gather relevant information for us to analyze your configuration and logs. Could you please execute it on the machine where the stack is running by following the steps described in the guide below?

How to Run the Bitnami Support Tool in a cloud image or virtual machine

Please note that you need to paste the code ID that is shown at the end.

Regards,
Michiel

code:13e01190-6c5d-3bba-fff3-fb37e173db6f

and i have this message:

The files listed below are bigger than 10MB and have not been included, please notify the support agent.

/opt/bitnami/magento/var/log/cron.log
/opt/bitnami/magento/var/log/exception.log
/opt/bitnami/magento/var/log/system.log

when i was restared elasticsearch and i run this comand " sudo /opt/bitnami/ctlscript.sh status" it show me this error “fatal error: runtime: out of memory bitnami magento” and i found this error in /opt/bitnami/php/logs in the file php-fpm.log “WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 78 idle, and 96 total children”

i was thinking it can be a problem of RAM and memory disk but my RAM=6G and DISK SPACE: Size:30G used:7.5G free:21G

but when i check my RAM i dont understand why it used 5G (my bitnami magento is in azure)
free -g
total used free shared buff/cache available
Mem: 6 5 0 0 0 0
Swap: 0 0 0

Hi @erikamartinez93315,

There seems to be a lot of idle php-fpm idle child processes. Could you set the max_children setting in the /opt/bitnami/apps/magento/conf/php-fpm/pool.conf to a lower amount?

pm.max_children = 30
pm.start_servers = 15
pm.min_spare_servers = 15
pm.max_spare_servers = 25
pm.max_requests = 500

Best regards,
Michiel

It`s works thank you so much!!!