I have 2 database indexes, one for nodes and one for profiles. I have them both set to index 6 items per cron run.
However, my watchdog logs show that this is happening multiple times per cron run. See screenshot.
This often crashes my site.

Any suggestions?

CommentFileSizeAuthor
dbindex-cron.png128.51 KBloze

Comments

loze created an issue. See original summary.

drunken monkey’s picture

Category: Bug report » Support request
Status: Active » Fixed

It's not the number of items per cron run, but the number of items in a batch. A cron job for Search API will always run for a set amount of time (search_api_index_worker_callback_runtime variable, 15 seconds by default), indexing batches until the time is up.
If this crashes the site, you can just reduce the time limit in the search_api_index_worker_callback_runtime variable.
Or, alternately, manually empty the static entity cache between indexing batches (e.g., in hook_search_api_items_indexed()).

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.