laravel-decomposer icon indicating copy to clipboard operation
laravel-decomposer copied to clipboard

Maximum execution time of 120 seconds exceeded

Open tornadofay opened this issue 6 years ago • 2 comments

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.

tornadofay avatar Jan 29 '19 08:01 tornadofay

Thanks for reporting this we will optimize this.

ajitbohra avatar Jan 29 '19 13:01 ajitbohra

@tornadofay

Currently I am using this package and maintaining it. Everyone can use it here https://github.com/nguyentranchung/laravel-decomposer

nguyentranchung avatar Aug 28 '20 11:08 nguyentranchung