Laravel-Backpack / basset

Better asset helpers for Laravel apps.
MIT License
151 stars 10 forks source link

basset:fresh causing timeout error #101

Closed hagealex closed 8 months ago

hagealex commented 8 months ago

Hello everyone!

I update my application from Backpack 5 to 6 and now, during my CI, I have a problem that occurs from time to time.

In my post-install-cmd in my composer.json I run php artisan basset:fresh. Sometimes I get this error:

In PendingProcess.php line 258:
The process "php artisan basset:cache" exceeded the timeout of 60 seconds.

In PendingProcess.php line 1158:
The process "php artisan basset:cache" exceeded the timeout of 60 seconds.

Is there something I can do to prevent this error?

pxpm commented 8 months ago

Hey @hagealex

I think the only solution would be to increase the execution time for that script.

You can do it globally by changing the php.ini settings in your webserver (probably not recommended).

Or alternatively you can allow only the basset:cache command to exceed those limits by calling:

php artisan basset:clear && php -d max_execution_time=120 artisan basset:cache

Let me know if that solved the issue for you.

Cheers.

hagealex commented 8 months ago

@pxpm This seems to work. I'll check this during my nexts builds.

Thank you so much for your hint!