Cron - All nodes are indexed at once

Created on 14 November 2024, about 1 month ago

On each cron, all nodes are indexed at once

Maybe I don't have the right feelings about how cron and search_api actually work.

By default, in the index settings, the cron limit is defined with '50'. When the cron is launched (Manually via the backend), all nodes appear indexed, in batches of 50.

On a site with a large number of nodes, this is problematic and can cause the site to become inactive.

Is there a solution to index only 50 or 100 nodes by cron ?

Thank you for your answers.

πŸ’¬ Support request
Status

Active

Version

1.35

Component

General code

Created by

πŸ‡«πŸ‡·France kumkum29

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @kumkum29
  • πŸ‡¦πŸ‡ΉAustria drunken monkey Vienna, Austria

    The cron limit that can be set via the UI only determines the batch size in which items will be indexed during cron. However, multiple such batches will be indexed if time permits – this is determined by the (hidden) cron_worker_runtime setting in the search_api.settings config object. The maximum run time defaults to 15 seconds, but setting this to 1 or even 0 will switch the behavior to index only a single batch per cron run, so that’s probably what you want to do.

Production build 0.71.5 2024