Last modified: 2014-09-25 17:47:11 UTC
when running composer install to get fresh install of Wikibase, I get fatal error due to timeout. Fatal error: Maximum execution time of 180 seconds exceeded in phar://composer.phar/bin/../src/../src/Composer/Util/ErrorHandler.php on line 36
despite in the php.ini settings: ; http://vanderveer.be/speed-up-composer-by-using-hhvm-including-a-slowtimer-error-fix/ hhvm.resource_limit.socket_default_timeout = 300 hhvm.http.slow_query_threshold = 300000 the timeout still appears to be 180 seconds.
I believe the threshold for script execution is controlled by 'max_execution_timeout' which still seems to be set at 180. [1] vagrant@mediawiki-vagrant:~$ php -r 'var_dump(ini_get("max_execution_time"));' string(3) "180" We _could_ change this globally for all php script, however considering this limit can easily be overridden at runtime it seems more like something that should be handled by composer itself. [1] http://docs.hhvm.com/manual/en/info.configuration.php#ini.max-execution-time
(In reply to Dan Duvall from comment #2) > I believe the threshold for script execution is controlled by > 'max_execution_timeout' which still seems to be set at 180. [1] > > vagrant@mediawiki-vagrant:~$ php -r > 'var_dump(ini_get("max_execution_time"));' > string(3) "180" > > We _could_ change this globally for all php script, however considering this > limit can easily be overridden at runtime it seems more like something that > should be handled by composer itself. > > [1] > http://docs.hhvm.com/manual/en/info.configuration.php#ini.max-execution-time I think this is a bug in hhvm actually. Read that documentation link you gave and you'll see that php5-cli defaults to "0" for this as can be seen with the php5 binary: $ php5 -r 'var_dump(ini_get("max_execution_time"));' string(1) "0"
(In reply to Bryan Davis from comment #3) > I think this is a bug in hhvm actually. Read that documentation link you > gave and you'll see that php5-cli defaults to "0" for this as can be seen > with the php5 binary: AFAICT there's no bug. We're explicitly setting it to 180 on the first line of /etc/hhvm/php.ini which affects the execution limit in all contexts. Remove that line and you get the expected value of 0 from the command line. You're right though, I should have read more closely. Since the default for CLI is 0 we probably shouldn't be messing with it. It looks like we may be able to move that setting to /etc/hhvm/server.ini. [1] Does that seem reasonable (if it works)? [1] https://github.com/facebook/hhvm/wiki/INI-Settings
(In reply to Dan Duvall from comment #4) > (In reply to Bryan Davis from comment #3) > > I think this is a bug in hhvm actually. Read that documentation link you > > gave and you'll see that php5-cli defaults to "0" for this as can be seen > > with the php5 binary: > > AFAICT there's no bug. We're explicitly setting it to 180 on the first line > of /etc/hhvm/php.ini which affects the execution limit in all contexts. > Remove that line and you get the expected value of 0 from the command line. The bug it is the difference in behavior between php and hhvm. Php5 ignores any ini setting for max-execution-time when executing in cli mode. You can see this by checking /etc/php5/cli/php.ini on your MW-Vagrant VM or a production host. "max_execution_time = 30" is included in that file, but the CLI SAPI entry point will ignore it and give the unlimited result when queried. This behavior is documented a little more clearly at <http://php.net/manual/en/features.commandline.differences.php> than it is on the ini settings page. > You're right though, I should have read more closely. Since the default for > CLI is 0 we probably shouldn't be messing with it. It looks like we may be > able to move that setting to /etc/hhvm/server.ini. [1] Does that seem > reasonable (if it works)? > > [1] https://github.com/facebook/hhvm/wiki/INI-Settings We can probably work around the problem by making changes to bring the hhvm configuration used in MW-Vagrant into sync with the configuration that has been done for production <https://github.com/wikimedia/operations-puppet/blob/production/modules/hhvm/manifests/init.pp>.
(In reply to Bryan Davis from comment #5) > The bug it is the difference in behavior between php and hhvm. Php5 ignores > any ini setting for max-execution-time when executing in cli mode. You can > see this by checking /etc/php5/cli/php.ini on your MW-Vagrant VM or a > production host. "max_execution_time = 30" is included in that file, but the > CLI SAPI entry point will ignore it and give the unlimited result when > queried. This behavior is documented a little more clearly at > <http://php.net/manual/en/features.commandline.differences.php> than it is > on the ini settings page. Got it! That's some seriously obscure behavior. > > You're right though, I should have read more closely. Since the default for > > CLI is 0 we probably shouldn't be messing with it. It looks like we may be > > able to move that setting to /etc/hhvm/server.ini. [1] Does that seem > > reasonable (if it works)? > > > > [1] https://github.com/facebook/hhvm/wiki/INI-Settings > > We can probably work around the problem by making changes to bring the hhvm > configuration used in MW-Vagrant into sync with the configuration that has > been done for production > <https://github.com/wikimedia/operations-puppet/blob/production/modules/hhvm/ > manifests/init.pp>. That definitely seems like the best longterm approach, but should we maybe just remove the setting for now?
Scratch that last question. I'll just go ahead and Do the Right Thing (tm). It looks easy enough to refactor.
Change 160571 had a related patch set uploaded by Dduvall: Split HHVM php.ini into common and fcgi hiera settings https://gerrit.wikimedia.org/r/160571
Change 160571 merged by Dduvall: Split HHVM php.ini into common and fcgi hiera settings https://gerrit.wikimedia.org/r/160571