Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MediaCollection and Conversion causing memory overflow #3774

Open
Yinci opened this issue Jan 27, 2025 · 0 comments
Open

MediaCollection and Conversion causing memory overflow #3774

Yinci opened this issue Jan 27, 2025 · 0 comments

Comments

@Yinci
Copy link

Yinci commented Jan 27, 2025

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 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant