We are running into a problem with our Production site and Geeth and I are having trouble finding a fix. The issue.
When reindexing of catalog product index or saving catalog product our server and mysql crashes. We have switched it to update on save to stop auto reindexing it via cron. Category Products and Product Categories are appearing as “processing”, when trying to reindex it breaks in the middle and our site crashes. It can be reset and we can run the reindex again but it wont complete, mysql and also the entire server including ssh is going down. Everything crashes when catalog product index is reindexing via sheduler(cron) or admin/ssh or if triggered by saving a product. Memory goes to 100% when reindexing it and everything crashes after that.
We have tried
php -d memory_limit=2G bin/magento indexer:reset catalog_category_product catalog_product_category and
php -d memory_limit=2G bin/magento indexer:reindex php -d memory_limit=2G bin/magento indexer php -d memory_limit=2G bin/magento indexer:reset php -d memory_limit=2G bin/magento indexer:reindex
When running a full index everything crashes. Any help or suggestions would be greatly appreciated. Thank you! (edited)