The most probable reason is an automatic import of products from an ERP system into the catalog by a third-party tool, extension, or custom code. The tool can update a lot of information on the products in the catalog (stock, prices, etc).
Each of these changes can trigger a save
event in Magento. The extension listens to these save
events to automatically keep your products up to date, so each change will trigger an indexing operation.
This can become problematic when the third-party tool, extension, or custom code triggers multiple save
events per product. For example:
- a third-party tool updates a product's price and saves the change
- the tool then updates the same product's description and saves this change too
The save
event will be fired twice, so the Algolia extension will update the index twice even though one update would have been sufficient. This type of behavior can lead to a significant spike in the number of indexing operations.
How to fix it
Identify which plug-in or piece of code triggers all the save events, and try to limit the amount of operations it performs.
If this is not possible, try to disable indexing to Algolia while the tool's update process is running and re-enable indexing when the tool is done.
If all of the above fails, try to use the indexing queue. The indexing queue will merge jobs whenever possible in order to limit the number of indexing operations.
Note: Some third-party tools bypass the save-mechanism in Magento by updating the database directly. This can cause your indices to be out-of-sync. A full reindex is needed to fix this issue.