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

Image sitemap generating fail on memory #2618

Closed
vitek-rostislav opened this issue May 18, 2023 · 1 comment · Fixed by #3144
Closed

Image sitemap generating fail on memory #2618

vitek-rostislav opened this issue May 18, 2023 · 1 comment · Fixed by #3144

Comments

@vitek-rostislav
Copy link
Contributor

Describe the bug

When generating the image sitemap, all offered products are loaded into memory at once. (See https://github.com/shopsys/shopsys/blob/master/packages/framework/src/Model/ImageSitemap/ImageSitemapFacade.php#L79). On our project (~20k products), this started to fail on OutOfMemoryError.

To Reproduce

  1. Load 20.000 products into your database
  2. Run php bin/console shopsys:cron --module="App\Model\ImageSitemap\ImageSitemapCronModule" --instance-name=export

Expected behavior

The sitemap should be generated regardless of the amount of products.

@vitek-rostislav
Copy link
Contributor Author

We have this resolved on our project, besides the problem with fetching products, there seems to be also a problem with a memory leak in Redis. probably related to symfony/symfony#43918 (even though the linked issue is already resolved).

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

Successfully merging a pull request may close this issue.

2 participants