Closed zizther closed 1 month ago
Hey @zizther, do you have "index relations" enabled? And if you're able, could you share your index & transformer setup? Thanks!
@janhenckens Thanks for getting back so quickly. I have tried with and without, the issues happens with either.
I also tried playing around stripping it back to just indexing an ID, that still caused the error. The only way i've found to stop the error is to limit the criteria query to 500, then it does it with ease.
Here is the scout config I am using. The guard behaviour adds some light params for consistency across the site. scout.php.zip
Thanks, I'll have a look at your config.
This also got me thinking that Scout could/should be taking advantage of the batched queue jobs that were added in 4.6(?), at least for the larger jobs like a full index refresh.
Thanks. I think the transformer is fairly light, and that generally this shouldn't be difficult for Craft
Nice idea about the batched jobs
Minor question @zizther but I see you have "storyReadTime" as a property in your transformer. What type of field is that?
@janhenckens this is just a plain text field. The content in the entry is only plain text or CKEditor fields
@zizther Tested this with a similar content with about 6000 entries and I'm not seeing anything special (running locally on DDEV).
Not sure if you have any other plugins or modules enabled, but if you're able to, could to try disabling everything but scout and see if the error still pops up?
@janhenckens Thanks for testing that out. I have tested on my local DDEV, disabling all plugin, apart from Scout, and custom modules.
The queue log didn't really show too much more than what i've already mentioned, however I have emailed this over to you.
This was a Craft 4.9 to 5.1 update, not sure if this could have caused any issues in relation to the data management.
Tested with the site/database in question, here are my findings:
Thus the issue seems related to that specific entry and Craft 5, not to Scout.
I'll close this issue for now - feel free to reference this off course should be raise the issue with P&T!
Thanks for your help looking into this. Upon further investigation, this is an issues with Craft 5 itself and the queries based on the volume of content in the query.
It just so happened to be the Scout plugin was the first it show there was an issue.
Issue
Since upgrading to Craft 5 from Craft 4 and to Scout 5.0.0-beta.1 I am encountering an issue where trying to refresh an index, which looks to get all entries from one section that contains 3000 entries, causes a MySQL issue
Memory allocation error: 1038 Out of sort memory
.Refreshing another index which gets all users, of which there are 550 works fine.
I don't think that increasing server sort buffer size would be necessary. The index refresh is working fine on Craft 4.9.1 and Scout 4.0.0.
Resaving a single entry to be indexed also causes the same error for the section.
The entry is only made up of plain text, lightswitch, dropdown and WYSIWYG fields, no matrix fields.
The error message from the queued job is:
Versions
Scout version: 5.0.0-beta.1 Craft CMS version: 5.1.1