Loved it until upgrading to HHVM
-
I keep getting this error:
Warning
The maximum time your server allows a script to run is too low for the plugin to run as intended, at startup 2 seconds have passedI’ve found that this code is causing the problem:
function nearing_execution_limit() { $built_in_delay = apply_filters( 'string-locator-extra-search-delay', 2 ); $execution_time = ( microtime( true ) - $this->start_execution_timer + $built_in_delay ); if ( $execution_time >= $this->max_execution_time ) { return $execution_time; } return false; }
It gets max_execution_time for this comparison from the following command:
$this->max_execution_time = ini_get( ‘max_execution_time’ );However when you use an ini_get command while running HHVM that result is always 0.
Due to this the check is failing, since essentially its own expected runtime is always bigger than 0.
The plugin works fine when I use PHP 7 instead, the error is no longer there and the search works as expected.
Will a static value for max_execution_time cause problems in other parts of the plugin? It cannot get the value dynamically via ini_get while HHVM is active.
- The topic ‘Loved it until upgrading to HHVM’ is closed to new replies.