Troubleshooting Parallel Drupal Solr Indexing
The message you see, and what to do
Troubleshooting
Find the message you see, or what happens, and do what its box says.
Messages
The command-line PHP has no pcntl. Install or enable it for the PHP version Drush uses, then check that both names appear:
php -m | grep -E '^(pcntl|posix)$'
See Requirements.
The background process stopped right after it started. Read the session's log for the reason, or run once
in the terminal to see it on screen: drush ost --no-background. The usual cause: the
vendor folder is not next to the Drupal web root, so the indexer cannot find
vendor/bin/drush.php or vendor/bin/drush to start its processes.
That session is still running. Follow it with drush oss, or stop it with
drush osstop. A file left by a process that no longer exists is cleared on its own.
Also ERROR: No enabled indexes found. These lines appear in the log, or on screen in the terminal mode. Check the machine names you passed:
drush search-api:server-list
drush search-api:list
The server must be enabled and run on Search API Solr; the index must be enabled and belong to that server.
A worker ran out of memory with its batch. Use a smaller --batch, or give the command-line PHP more memory.
drush ost --server=my_solr_server --batch=100
Symptoms
Some items never get marked as indexed, and the indexer takes them again in every round. It does not stop on its own here.
- Look for worker errors:
An error such as Solr not answering: fix the cause, and the next rounds index the items.grep 'OpenSolr Worker' /tmp/opensolr_turbo_my_solr_server.log - No errors: the tracker lists content that no longer loads. Run
drush osstop, then drush osrb, thendrush ost.
The workers did not know your site's address. Set it as shown in
Background mode, under Your site's address,
then rebuild the documents: drush osri and drush ost.
Rebuild the tracker: drush osrb.
drush osstop ends every worker on the machine and cleans the session files. If a main process is still there after that:
pkill -f 'opensolr:turbo-daemon'
drush osstop
Reference
- Workers and batch size
- Troubleshooting
- Files and logs