-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Magento 2.4.1 Media Gallery....not ready for prime time. Fails when you have large amounts of data (images) #30596
Comments
Hi @perfpcs. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
For more details, please, review the Magento Contributor Assistant documentation. Please, add a comment to assign the issue:
🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
Hi @engcom-Bravo. Thank you for working on this issue.
|
@magento I am working on this |
@engcom-Bravo Thank you for verifying the issue. Unfortunately, not enough information was provided to acknowledge ticket. Please consider adding the following:
Once all required information is added, please add label |
@keerthisuresh no the issue is worse on 2.4.5-p1. I had to switch to old style which works ok. |
@pmonosolo wow, hard to believe that this continues to get worse instead of better. I guess Magento team is lacking good programmers for this sort of thing. This is all very disappointing and why many now go over to Shopify. |
I think there's maybe not enough of devs - the project is huge and there are 1239187298371929 technologies included. So the complexity of issues is high. |
That's for sure but still its been broken since day one of the new media gallery so I think that is over 2 years now that it is still not fixed. It's been a long time! |
So, here we are, in 2023, on Magento 2.4.5-p1 Commerce/Enterprise... Issue still not fixed. |
Are you guys still trying add custom folders to the media gallery? Our module https://github.com/magenizr/Magenizr_MediaGalleryFolder will fix that. Happy to extend our module if something is missing. Please reach out or open an issue in our repository. |
@magenizr ...None of us need anything custom, we just need the feature to work as designed. But after 2 years I think a lot of us are just giving up. The Magento team just doesn't seem to know how to fix all the problems with this new media gallery and so we all just go back to the old media gallery. It's extremely disappointing. |
A patch exists since 2.4.4 instance => ACSD-47137 (available with package magento/quality-patches) And this is fixed in the core code with new release 2.4.6 To install it : https://experienceleague.adobe.com/tools/commerce-quality-patches/index.html |
The patch is only limiting folders for directory tree, but still can't handle a lot of files in it. So issue with performance not fixed at all. |
As i sad in some of my commets, don't remember exact year ;) The only way to resolve it correctly is rework directory tree initialization by loading only first level folders, and then others sub folders when we are clicking on a parent level. But for now i'm not interested in it, since have a lot of other things to do. But if someone from adobe can implement it, it would be great! |
@BouBooo the patch you mentioned did the trick for us. We had a lot of images and the folder structure did not load. I came to this page because I had the same issue and the patch worked. |
Switched to Old Media Gallery due no plan upgrading yet, issue persistent on 2.4.3-p3 |
Any back-port available for this? the issue is no longer on 2.4.7 anymore, apparently a commit of this fix must be provided |
Preconditions (*)
The new media gallery introduced in Magento 2.4.1 certainly was not vetted using a large robust shop. Maybe it was designed with 100-200 products like the using Magento sample data but I can tell you from my experience trying to use this, it does NOT work when you have a large amount images. Since we use compression software to have images ready for desktop, table, phone and WEBP use. We have generated over a half a million images for our shop. What happens is that the images will load but the directory tree fails to generate due to sessions being destroyed and memory exhaustion. Even setting php.ini to basically unlimited use of ram and setting our instance to 192 GB physical ram, the media gallery still fails to load the directory tree. This is very disappointing! What I don't understand either is why would the media galley be set with /media as the storage root? This is the main problem as 95% of the images in the media gallery are product images. Most shops don't use product images to create banners or make CMS blocks or pages. The correct root for media gallery in my opinion should have been the /wysiwyg directory. That is what is used when dealing with media and the CMS block and pages creation. If this was set as root then these issues with session destruction and memory failures would never happen. Or, the media gallery should exempt the catalog/product images like it is in the old media gallery. If you go to those catalog/product folders you will see there are no images. That is another correct way this gallery should have been setup, in my humble opinion.
How to produce error (*)
Steps to reproduce (*)
Expected result (*)
see various images. It should look like this:
Actual result (*)
[19-Oct-2020 04:26:51 UTC] PHP Fatal error: Allowed memory size of 792723456 bytes exhausted (tried to allocate 8192 bytes) in /home/cloudpanel/htdocs/www.performance-pcs.com/vendor/magento/framework/Filesystem/Driver/File.php on line 962
[19-Oct-2020 04:26:51 UTC] PHP Fatal error: Allowed memory size of 792723456 bytes exhausted (tried to allocate 135168 bytes) in /home/cloudpanel/htdocs/www.performance-pcs.com/vendor/magento/framework/Session/SessionManager.php on line 151
[19-Oct-2020 04:26:51 UTC] PHP Fatal error: Allowed memory size of 792723456 bytes exhausted (tried to allocate 65536 bytes) in /home/cloudpanel/htdocs/www.performance-pcs.com/vendor/colinmollenhour/php-redis-session-abstract/src/Cm/RedisSession/Handler.php on line 793
[19-Oct-2020 04:26:51 UTC] PHP Fatal error: Uncaught RuntimeException: Unknown: Cannot call session save handler in a recursive manner in [no active file]:0[19-Oct-2020 08:29:18 UTC] PHP Warning: DOMXPath::query(): Invalid expression in /home/cloudpanel/htdocs/www.performance-pcs.com/vendor/pelago/emogrifier/src/Emogrifier.php on line 494
[19-Oct-2020 08:29:18 UTC] PHP Warning: DOMXPath::query(): Invalid expression in /home/cloudpanel/htdocs/www.performance-pcs.com/vendor/pelago/emogrifier/src/Emogrifier.php on line 494
[19-Oct-2020 08:29:18 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/cloudpanel/htdocs/www.performance-pcs.com/vendor/pelago/emogrifier/src/Emogrifier.php on line 503
[19-Oct-2020 09:06:41 UTC] PHP Fatal error: Allowed memory size of 792723456 bytes exhausted (tried to allocate 8192 bytes) in /home/cloudpanel/htdocs/www.performance-pcs.com/vendor/magento/framework/Filesystem/Driver/File.php on line 962
[19-Oct-2020 09:06:41 UTC] PHP Fatal error: Allowed memory size of 792723456 bytes exhausted (tried to allocate 40960 bytes) in /home/cloudpanel/htdocs/www.performance-pcs.com/vendor/magento/framework/Session/SessionManager.php on line 151
[19-Oct-2020 09:06:41 UTC] PHP Fatal error: Allowed memory size of 792723456 bytes exhausted (tried to allocate 65536 bytes) in /home/cloudpanel/htdocs/www.performance-pcs.com/vendor/colinmollenhour/php-redis-session-abstract/src/Cm/RedisSession/Handler.php on line 793
[19-Oct-2020 09:06:41 UTC] PHP Fatal error: Uncaught RuntimeException: Unknown: Cannot call session save handler in a recursive manner in [no active file]:0[19-Oct-2020 09:54:47 UTC] PHP Fatal error: Uncaught RuntimeException: ObjectManager isn't initialized in /home/cloudpanel/htdocs/www.performance-pcs.com/vendor/magento/framework/App/ObjectManager.php:36
Stack trace:
#0 /home/cloudpanel/htdocs/www.performance-pcs.com/vendor/magento/framework/Filesystem/Directory/Read.php(78): Magento\Framework\App\ObjectManager::getInstance()
#1 /home/cloudpanel/htdocs/www.performance-pcs.com/vendor/magento/framework/Filesystem/Directory/Read.php(212): Magento\Framework\Filesystem\Directory\Read->validatePath()
#2 /home/cloudpanel/htdocs/www.performance-pcs.com/vendor/magento/framework/Code/GeneratedFiles.php(123): Magento\Framework\Filesystem\Directory\Read->isExist()
#3 /home/cloudpanel/htdocs/www.performance-pcs.com/vendor/magento/framework/Code/GeneratedFiles.php(98): Magento\Framework\Code\GeneratedFiles->isCleanGeneratedFilesAllowed()
#4 /home/cloudpanel/htdocs/www.performance-pcs.com/vendor/magento/framework/App/ObjectManagerFactory.php(114): Magento\Framework\Code\GeneratedFiles->cleanGeneratedFiles()
#5 /home/ in /home/cloudpanel/htdocs/www.performance-pcs.com/vendor/magento/framework/App/ObjectManager.php on line 36
Things we tried and results:
a. From the error shown you have reached the limit of 768M that was set on the php config file.
We have increased it and set to memory_limit = 1024M
b. The php-fpm of cli had memory_limit = 4048M. We have set this to unilimited
c. So we have increased the memory limit to :8092M on file ".user.ini" on Magento root & inside pub/ location.
mgt@performance-pcs:/home/cloudpanel/htdocs/www.performance-pcs.com/pub$ cat .user.ini
memory_limit = 8092M
So now what?? We need to access all our NON-PRODUCT IMAGES!. I can turn back on old media gallery and it does work but I would like to use the new one with the Adobe image features, that is handy!
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
Additional info from Engcom
To reproduce the issue
Actual Result: Media gallery directory tree component renders directory tree component
The text was updated successfully, but these errors were encountered: