bref
bref copied to clipboard
Maximum execution time of 120 seconds exceeded - Laravel bref
Description:
I have deployed a Laravel application to export data from DB to excel using Laravel application. It worked fine for a long time. But now I done the version upgrade for the whole project. But now facing the below mentioned issues related to timeout
Maximum execution time of 120 seconds exceeded {"exception":"[object] (Symfony\\Component\\ErrorHandler\\Error\\FatalError(code: 0): Maximum execution time of 120 seconds exceeded at /var/task/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Collection/Cells.php:413)
Previous Package Versions in composer.json "php": "^7.3|^8.0", "laravel/framework": "^8.40", "bref/bref": "^1.2", "bref/laravel-bridge": "^1.1",
Upgraded Package Versions in composer.json "php": ">=8.0.2", "laravel/framework": "v9.6.0", "bref/bref": "^1.5", "bref/laravel-bridge": "^1.2",
I tried the below mentioned steps to increase the max execution time.
- Added the ext values as mentioned in this link - https://bref.sh/docs/environment/php.html#extensions
- Added ini_set('max_execution_time', 900); in command file.
- Added ini_set('max_execution_time', 900); in laravel excel export file also.
- Downgraded the bref/bref && bref/laravel-bridge package back to old version. But still facing same issue.
I have get the ini value in code, but the value of max_execution_time is coming as 900.
Hello,
What layer are you using?
In your serverless.yml
, did you set a value for the timeout?
On the function PHP layer, the max_execution_time
is at 0, so no timeout is possible. Did you execute ini_get("max_execution_time")
to get the current value? If it says 900 in your last line, is it ok then?
Closing because of inactivity, let's reopen if needed!