Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase Process timeout or make it configurable #54

Closed
fritzmg opened this issue Dec 19, 2017 · 4 comments
Closed

Increase Process timeout or make it configurable #54

fritzmg opened this issue Dec 19, 2017 · 4 comments
Assignees
Labels
Milestone

Comments

@fritzmg
Copy link
Contributor

fritzmg commented Dec 19, 2017

The manager-bundle uses Symfony\Component\Process\Process in ScriptHandler::executeCommand. Its default timeout is 60 seconds. However, in some environments warming the cache can take a long time and thus the execution of this command ends with an exception:

 // Warming up the cache for the prod environment with debug false

Script Contao\ManagerBundle\Composer\ScriptHandler::initializeApplication handling the post-update-cmd event terminated with an exception


  [Symfony\Component\Process\Exception\ProcessTimedOutException]
  The process ""php" "…/vendor/contao/manager-bundle/src/Composer/../
  ../bin/contao-console" --ansi cache:warmup --env=prod" exceeded the timeout of 60 seconds.

See also https://community.contao.org/de/showthread.php?68815-gelöst-Contao-Manager-bricht-ab-(Timeout). There are a few more reported instances. They happen especially when the Contao Manager is in use.

@fritzmg
Copy link
Contributor Author

fritzmg commented Dec 20, 2017

The contao-manager uses a default timeout of 500 seconds for example for its Symfony\Component\Process\Processes as far as I can see: https://github.com/terminal42/background-process/blob/master/src/Forker/AbstractForker.php#L28

/cc @aschempp

@fritzmg
Copy link
Contributor Author

fritzmg commented Feb 15, 2018

This continues to be a problem for us on in some hosting environments. Could the timeout please be increased to 500 in Contao 4.4.15 and 4.5.5?

@diegovdev
Copy link

Same issue here when running Contao 4.4 managed edition in a Docker container. I was able to workaround this issue by adding an explicit timeout limit $process->setTimeout(2000); at vendor/contao/manager-bundle/src/Composer/ScriptHandler.php:executeCommand(...) like the image shows below.

I think it would be nice if these processes honor the COMPOSER_PROCESS_TIMEOUT environment variable.

screen shot 2018-02-20 at 7 10 20 pm

@leofeyer leofeyer added this to the 4.4.15 milestone Feb 21, 2018
@leofeyer leofeyer self-assigned this Mar 1, 2018
@leofeyer
Copy link
Member

leofeyer commented Mar 1, 2018

Fixed in df75e03.

@leofeyer leofeyer closed this as completed Mar 1, 2018
@leofeyer leofeyer modified the milestones: 4.4.15, 4.4 May 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants