-
Notifications
You must be signed in to change notification settings - Fork 342
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
500 Error on show more filter results 1.6M skus #1591
Comments
Hello @stb,
On a hunch, given the second error, I would blame We'll try to look into it. Regards, |
Thanks I just checked the sort order for all fields, which is set to default (result count). But you are damn right, it's the sort that makes the problem! I just changed it to admin sort and it loads the filters instantly. The question now is how can it be solved so that it works with sort. I checked with sort by name and relevance enabled - also the same issue. Should I open a new issue for that? |
I was totally not shooting in that direction, but glad I hit something nonetheless...
If it's entirely related, there is no need.
Are your positive about that ? Regards, |
No I have not changed the bucket size. I have just increased the number of shards to 20. |
Managed to reproduce it with both a virtual and physical category containing all of a 42K catalog organised with :
Same symptoms as #1581 : an Elasticsearch request is sent with a pagination size of 24827, and the fulltext collection tries to load all the products. |
to avoid a pageSize of getSize() set in the collection ie all matching products. Same issue as Smile-SA#1581 and same ugly fix for the time being.
when only fetching aggregations. Keeps the "Show all" working by distinguishing between NO page size set ("Show all") and a page size of 0. Does not cover someone setting a page size of null for the fun, though.
when only fetching aggregations. Keeps the "Show all" working by distinguishing between NO page size set ("Show all") and a page size of 0. Also covers someone setting a page size of null for the fun.
Just tested the fix and can also confirm that it is now working. Thank you! |
Preconditions
Single instance (Apache2, Percona, Elasticsearch), 14 CPU's | 64GB RAM | SSD
Magento Version : 2.3.2 CE
PHP: 7.2
Elasticsearch min_heapsize: 16 GB
PHP memory_limit: 2048 MB
1.6M simple products
ElasticSuite Version : 2.8.2
Environment : Developer
We have around 1.6 M sku's with 4-6 active layered navigation filters with each between 100 - 600 entries. When your result set is large > ~ 50.000 skus then the show more button (and search) which does the ajax request to get the additional filters get's a 500 error.
First error was
Result window is too large, from + size must be less than or equal to: [100000] but was [1621521].
So we increased the shards to 20 as per #599 & reindexed.
Then we got a PHP Fatal error:
Allowed memory size of 792723456 bytes exhausted (tried to allocate 1319170176 bytes) in /var/www/html/magento2/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php on line 289
So we increased the php memory_limit to 2048 MB.
Now we have the exhaustion of the database:
Allowed memory size of 2147483648 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/magento2/vendor/magento/framework/DB/Statement/Pdo/Mysql.php on line 91
It is obviously the size of the result set combined with the amount of navigation filters. On our 1.9.4 setup we limited the resultset of the filters to 200 for performance reasons but we would obviously prefer not to do that. Any ideas on what might cause the exhaustion? I figured as you guys have experience with larger magento 2 instances you might know the pitfalls.
Thanks!
The text was updated successfully, but these errors were encountered: