OpenSolr Turbo Indexer

True Parallel Solr Indexing for Drupal 9 / 10 / 11

Background Mode

For long-running indexing jobs, use background mode so the process continues even if your SSH connection drops.

# Start in background
drush ost --workers=4 --batch=100 --background

# Check progress anytime
drush oss

# Watch the log file
tail -f /tmp/opensolr_turbo.log

# Stop when needed
drush osstop
📝 Log Location
Background mode writes progress to /tmp/opensolr_turbo.log every 5 seconds.

How Background Mode Works

When you add the --background flag, the indexer:

  1. Starts a daemon process using nohup
  2. Detaches from your terminal session
  3. Writes progress to a log file instead of stdout
  4. Continues running even if you disconnect

Monitoring Background Jobs

Check Status

Use drush oss to see current progress:

drush oss

=== INDEXING STATISTICS ===

  my_solr_index          [██████████░░░░░░░░░░]  52.3%
    156,432 / 299,123 (remaining: 142,691)

Background indexer running (PID: 12345)
Log: /tmp/opensolr_turbo.log

Active workers: 4

Watch the Log

For detailed real-time progress:

tail -f /tmp/opensolr_turbo.log

The log shows updates every 5 seconds with:

Stop Background Indexing

drush osstop

This stops both the master daemon and all worker processes cleanly.

Process Management

Find Running Processes

# Find master process
cat /tmp/opensolr_turbo_master.pid

# List all worker processes
ps aux | grep 'opensolr:worker'

# Count active workers
ps aux | grep 'opensolr:worker' | grep -v grep | wc -l

Emergency Stop

If drush osstop doesn't work:

# Kill master process
kill $(cat /tmp/opensolr_turbo_master.pid)

# Kill all workers
pkill -f 'opensolr:worker'

# Clean up PID files
rm -f /tmp/opensolr_turbo*.pid
⚠️ One Instance Only
Only one background indexer can run at a time. If you try to start another, you'll see an error with the existing process PID.