Setting a max_execution_time limit for PHP CLI
PHP's command line interface doesn't respect the max_execution_time
limit within your php.ini settings. This can be both a blessing and a curse (but more often the latter). There are some drush scripts that I run concurrently for batch operations that I want to make sure don't run away from me, because they perform database operations and network calls, and can sometimes slow down and block other operations.
Can you tell when the batch got backlogged? CPU usage spiked to 20, and threads went from 100 to 400.
I found that some large batch operations (where there are hundreds of thousands of items to work on) would hold the server hostage and cause a major slowdown, and when I went to the command line and ran:
$ drush @site-alias ev "print ini_get('max_execution_time');"