bref icon indicating copy to clipboard operation
bref copied to clipboard

Maximum execution time of 120 seconds exceeded - Laravel bref

Open poovarasudev opened this issue 2 years ago • 1 comments

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.

  1. Added the ext values as mentioned in this link - https://bref.sh/docs/environment/php.html#extensions
  2. Added ini_set('max_execution_time', 900); in command file.
  3. Added ini_set('max_execution_time', 900); in laravel excel export file also.
  4. 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.

poovarasudev avatar Jul 13 '22 13:07 poovarasudev

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?

afu-dev avatar Aug 12 '22 12:08 afu-dev

Closing because of inactivity, let's reopen if needed!

mnapoli avatar Mar 15 '23 09:03 mnapoli