-
Notifications
You must be signed in to change notification settings - Fork 642
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
Serialization failure #15221
Comments
Thanks for reporting that @ptrykulich. It looks like you’re hitting deadlocks due to gap locks. We’ll discuss this internally and see what should be done about it. In the meantime, you should be able to avoid the errors by only having one queue runner handling these jobs. |
I could use one handler for the queue if I could handle these tasks through a separate runner. Because I need that these big queues did not stop other tasks and this queue was not stopped by others. I talked about this in Discord with your staff and got a response that I think would be good for me. And get the expected implementation:
But it has not yet been implemented. |
It’s already possible to create a custom queue and push those big jobs to it. // config/app.php
return [
// ...
'bootstrap' => [
'resaveQueue',
],
'components' => [
'resaveQueue' => [
'class' => craft\queue\Queue::class,
],
],
]; // your module
Craft::$app->resaveQueue->push(new MyResaveJob(/* ... */)); The only caveat is that those jobs won’t show up in the Queue Manager utility (#13347). But all the CLI commands will be available. php craft help resaveQueue |
Thanks! We will use this solution! But at some point would be great to have deadlock problem sorted. |
Yeah it’s on the list to discuss on our next team call on Monday. |
@brandonkelly did you work out a solution / plan for this? we run into it in exactly the same scenario, worked around by batching them and running sequentially. |
Whoops, forgot to follow up. We decided to take a low-fi approach and just try again a couple times if a deadlock occurs. Just implemented that for the next v4 and v5 releases. |
Craft 4.13.4 and 5.5.4 are out with that change. |
What happened?
Description
I programmatically store about 3 thousand entries, each of which contains a Neo matrix and other fields.
I divide the queue into queues of 250 records and they are processed 3-5 at a time.
Steps to reproduce
Restore the entries of the same section in different queues, using 3-5 runners at the same time.
Expected behavior
Performing a resave without errors.
Actual behavior
Errors occur during the resave process:
The SQL being executed was: INSERT INTO
searchindex
(elementId
,attribute
,fieldId
,siteId
,keywords
) VALUES (6570286, 'slug', 0, 1, '') | File: vendor/yiisoft/yii2/db/Schema.php | Line: 676The SQL being executed was: ROLLBACK TO SAVEPOINT LEVEL1
Craft CMS version
Craft Pro 4.7.0
PHP version
8.1.28
Operating system and version
Linux 6.5.0-1018-aws
Database type and version
MySQL 8.0.35
Image driver and version
Imagick 3.7.0 (ImageMagick 6.9.11-60)
Installed plugins and versions
The text was updated successfully, but these errors were encountered: