Cron and index issues in Adobe Commerce on Cloud Infrastructure
Recurring problems with automatic indexing via cron can disrupt store operations, especially during peak times. By resetting indexer configurations and optimizing update modes, you can improve system reliability and ensure uninterrupted operations.
Description description
Environment:
Adobe Commerce on Cloud Infrastructure
Issue/Symptoms:
- Automatic indexing via cron fails intermittently, causing a backlog of processes.
- Products are not published in the store due to unexecuted cron jobs.
Resolution resolution
To resolve the issue, try the following steps:
-
Reset the indexer settings to ensure functionality.
-
Enable application lock for indexing. On-Premise add the following configuration to your
app/etc/env.php
file:code language-none 'indexer' =>[ 'use_application_lock' => true ]
-
For steps, refer to Using application lock mode for reindex processes in the Commerce Indexing Guide.
-
On Cloud, configure via environment variables instead of modifying
app/etc/env.php
. AddMAGENTO_DC_INDEXER__USE_APPLICATION_LOCK
to.magento.app.yaml
. You can also increase the number of indexer threads:code language-none variables: env: MAGENTO_DC_INDEXER_USE_APPLICATION_LOCK: 1 MAGE_INDEXER_THREADS_COUNT: 3
-
Set indexers to Update on Schedule mode as recommended by Adobe. Ensure that the Customer Grid is configured for real-time indexing using the Update on Save option. For steps, refer to Manage the indexers in the Commerce Configuration Guide.
-
Enable maintenance mode before switching indexer modes. Disable cron jobs temporarily to avoid database locks during updates. For steps, refer to Enable or disable maintenance mode in the Commerce Installation Guide.
-
Allow cron jobs to execute normally once changes are made.
By implementing these recommendations, you should be able to resolve recurring issues with automatic indexing and improve system reliability during peak periods.