laravel-decomposer
laravel-decomposer copied to clipboard
Maximum execution time of 120 seconds exceeded
first of all thanks for this package, it's really great package.
I'm getting the following error when I go to http://myapp/decompose
Maximum execution time of 120 seconds exceeded {"userId":1,"email":"******@gmail.com","exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalErrorException(code: 1): Maximum execution time of 120 seconds exceeded at C:\\wamp\\www\\SPF\\vendor\\lubusin\\laravel-decomposer\\src\\Decomposer.php:269)
so I followed the error to \lubusin\laravel-decomposer\src\Decomposer.php
private static function folderSize($dir)
{
$size = 0;
foreach (glob(rtrim($dir, '/').'/*', GLOB_NOSORT) as $each) {
$size += is_file($each) ? filesize($each) : self::folderSize($each);
}
return $size;
}
I simply commented this part which calculate application size
// foreach (glob(rtrim($dir, '/').'/*', GLOB_NOSORT) as $each) {
// $size += is_file($each) ? filesize($each) : self::folderSize($each);
// }
it gave me App Size: 0 B but everything else worked fine. so I don't know if this problem on my dev machine only, but will it run fine on production server ? or not.
Thanks.
Thanks for reporting this we will optimize this.
@tornadofay
Currently I am using this package and maintaining it. Everyone can use it here https://github.com/nguyentranchung/laravel-decomposer