ip: 192.168.10.10
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
-
map: ___
to: ___
sites:
-
map: ___
to: ___
schedule: true
databases:
- homestead
name: code
hostname: code
Z-Ray data collection shouldn't be enabled by default.
Z-Ray collect queries even though zray: 'true' is not set on Homestead.yaml. This cause huge memory leak when running a large number of queries on an artisan command (on the CLI).
Add the following in the __construct method of your command.
if (function_exists('zray_disable')){
zray_disable(true);
}
Even if you'll decide to do nothing about it, I thought it would be useful to leave it here for future reference. I got crazy looking for the cause of the leak.
thanks for the report @micc83 . we actually discovered this issue a couple days ago in the Slack channel. It seems to only affect php7.2 on the CLI.
I have personally run into the issue running database seeds. The solution for now is to use php 7.1
php7.1 artisan db:seed
We are planning a fix and a new box release in the next couple weeks.
Here is the relevant settler PR. https://github.com/laravel/settler/pull/145/files
Most helpful comment
thanks for the report @micc83 . we actually discovered this issue a couple days ago in the Slack channel. It seems to only affect php7.2 on the CLI.
I have personally run into the issue running database seeds. The solution for now is to use php 7.1
We are planning a fix and a new box release in the next couple weeks.
Here is the relevant
settlerPR. https://github.com/laravel/settler/pull/145/files