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:

  1. Reset the indexer settings to ensure functionality.

  2. 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
        ]
    
  3. For steps, refer to Using application lock mode for reindex processes in the Commerce Indexing Guide.

  4. On Cloud, configure via environment variables instead of modifying app/etc/env.php. Add MAGENTO_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
    
  5. 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.

  6. 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.

  7. 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.

recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f