Search indexer killed by PHP max_execution_time despite sulu_search.indexer_timeout setting
21.5K reputation · 25 Jul 2021, 09:02 UTC
Problem
On Sulu 2.5 (Symfony 6.x), a full rebuild of the search index via bin/websiteconsole sulu:search:index (or the admin reindex action) is terminated partway through large content trees. The process appears to be stopped by PHP's max_execution_time rather than by any Sulu-level timeout, and no partial-progress or cancellation message is surfaced in the logs.
Configuration
The relevant snippet in config/packages/sulu_search.yaml is:
sulu_search:
indexer_timeout: 600With this set, I expected the indexer to be allowed up to 600 seconds regardless of the global PHP limit. However, the job still dies at roughly the default execution limit, which suggests the setting is either not applied to the CLI context, not recognized in this Sulu version, or overridden elsewhere.
Questions
- Does
sulu_search.indexer_timeoutactually raise the execution limit for both CLI and admin-triggered indexing, or only one of them? - Is there a documented way in Sulu to checkpoint or resume an interrupted index rebuild, or must the whole index be rebuilt from scratch?
- What is the recommended approach for graceful handling of timeouts during indexing on Sulu 2.5 / Symfony 6?