You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the media-library:clean command, at a certain point the system will run out of memory.
Underlying cause
After hours and hours of debugging, I've pinpointed a pretty linear memory increase every time InteractsWithMedia::registerAllMediaConversions is called. We have quite a few conversions registered, and they seem to be the main source of the memory increase.
What have you tried?
I've tried everything I can think off, even reaching the point that I've simply extended the command to try and reset the mediaCollections and mediaConversions property. If that is followed with a gc_collect_cycles, the memory used by the collections is freed, but the memory from the conversions is still in use. I cannot figure out how I can free up the memory that is being used simply by fetching registered conversions, but it feels like this overflow is not something that should be happening to begin with.
Versioning
PHP 8.1
Laravel 10.48.27
Media library 10.15.0
Note: I would like to update to 11 but as of right now, the 8.1 PHP constriction refrains us from updating due to the 8.2 requirement. I am not sure it would fix the issue, however.
The text was updated successfully, but these errors were encountered:
What is the issue:
When running the
media-library:clean
command, at a certain point the system will run out of memory.Underlying cause
After hours and hours of debugging, I've pinpointed a pretty linear memory increase every time
InteractsWithMedia::registerAllMediaConversions
is called. We have quite a few conversions registered, and they seem to be the main source of the memory increase.What have you tried?
I've tried everything I can think off, even reaching the point that I've simply extended the command to try and reset the
mediaCollections
andmediaConversions
property. If that is followed with agc_collect_cycles
, the memory used by the collections is freed, but the memory from the conversions is still in use. I cannot figure out how I can free up the memory that is being used simply by fetching registered conversions, but it feels like this overflow is not something that should be happening to begin with.Versioning
PHP 8.1
Laravel 10.48.27
Media library 10.15.0
Note: I would like to update to 11 but as of right now, the 8.1 PHP constriction refrains us from updating due to the 8.2 requirement. I am not sure it would fix the issue, however.
The text was updated successfully, but these errors were encountered: