A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://getrector.com/documentation/troubleshooting-parallel below:

Rector Docs: PHP Refactoring Guide

Troubleshooting Parallel

You may get some parallel errors and ask how you can identify if there is something in your code or a real parallel issue than can be fixed by configuration. They may be displayed as:

$ vendor/bin/rector process

...
[ERROR] Could not process "/src/SomeFile.php" file, due to:
    "Child process timed out after 120 seconds"

[ERROR] Could not process some files, due to:
    "Reached system errors count limit of 50, exiting..."

When this happens, the first good approach is to use --debug option that automatically disables parallel processing.

After that, if Rector processing works fine, that is an indication that you might need to adjust your parallel process to some balanced load, depending on the resources you have to process rector.

Configure Parallel#

There are 3 options we can define for parallel processing:

public function parallel(
    int $seconds = 120,
    int $maxNumberOfProcess = 16,
    int $jobSize = 16
): void

To manually set these options, call the parallel function within the Rector config class:

return RectorConfig::configure()
    ->withParallel(120, 16, 10);

You can make it aligned with what you have at your disposal:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4