Skip to main content

PHP-CLI has maximum execution time clamped at 300 seconds

Comments

2 comments

  • cPanelLauren
    Can you run the following rpm -qa |grep php-cli
    cat /etc/cpanel/ea4/php.conf
    And I'm curious if you've gone over this documentation? EasyApache 4 and the ea-php-cli Package | cPanel & WHM Documentation
    0
  • Adam Reece | WebBox
    Hi Lauren, Thank you for your response. As per your request: # rpm -qa | grep php-cli | sort ea-php56-php-cli-5.6.40-15.15.1.cpanel.x86_64 ea-php71-php-cli-7.1.33-7.7.1.cpanel.x86_64 ea-php72-php-cli-7.2.32-2.2.1.cpanel.x86_64 ea-php73-php-cli-7.3.20-2.2.1.cpanel.x86_64 ea-php-cli-1.0.0-9.9.3.cpanel.x86_64 ea-php-cli-lsphp-1.0.0-9.9.3.cpanel.x86_64 # cat /etc/cpanel/ea4/php.conf --- default: ea-php73 ea-php56: suphp ea-php71: suphp ea-php72: suphp ea-php73: suphp
    I'd not seen that documentation. I think this is actually our mistake. The script in question is not a simple single file but class based with inheritance and such. At an earlier point a parent class was calling set_time_limit(300)
    before the primary class was calling set_time_limit(3600)
    . Either a race condition was occurring whereby the parent class' call was happening after the primary class, or a bug in PHP doesn't accept any subsequent calls to set_time_limit()
    after the first. Either way I'm not very confident that cPanel or its PHP-CLI configuration is at fault, though perhaps our mistake and findings will be useful for someone else.
    0

Please sign in to leave a comment.