Skip to content

Commit

Permalink
Update SchemaState Process to remove timeout (#39139)
Browse files Browse the repository at this point in the history
As shown in Symphony Process docs: https://symfony.com/doc/current/components/process.html#process-timeout

All Process spawned have a default timeout of 60 seconds. For a pg_dump script. 60 seconds might or might not be enough especially if this is run in a CI/CD envrionment where process contention (in shared or virtual hardware) is an issue.

Removing the timeout is great because running migrations could be seen as a long lived process by most users and developers.
  • Loading branch information
amanpatel authored Oct 7, 2021
1 parent 65702d2 commit 2b95dd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Database/Schema/SchemaState.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function __construct(Connection $connection, Filesystem $files = null, ca
$this->files = $files ?: new Filesystem;

$this->processFactory = $processFactory ?: function (...$arguments) {
return Process::fromShellCommandline(...$arguments);
return Process::fromShellCommandline(...$arguments)->setTimeout(null);
};

$this->handleOutputUsing(function () {
Expand Down

0 comments on commit 2b95dd9

Please sign in to comment.