You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
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
Hey everyone!
I have an issue with saving an entity that has nested components - an Internal Server Error happens when updating an entity with multiple nested components.
The error is:
ER_LOCK_DEADLOCK: Deadlock found when trying to get lock; try restarting transaction
If I try saving the entity multiple times, sometimes, on the 10th or 20th time it may save, but then the error comes back.
Steps to reproduce the behavior
Please use this repository for a reproduction:
https://github.com/kilobyte2007/strapi-bug-reproduction
Start strapi (you have first to specify your database credentials)
Go to
Content Manager
Select
Landing Page
Click
Create new entry
Click
Add a component to sections
Select
Pricing Plans
Add 2 plans
Specify at least 5 features for every plan
Click
Save
- the error usually happens here, but sometimes there is no error at first so go back and add one more feature to any plan and try clicking
Save
again
Expected behavior
The entity saves without an error.
Screenshot
System information
Node.js version: v16
NPM version: v8
Strapi version: 4.5.1
Database: MySQL 8.0
Operating system: Reproduced on both macOS and Linux
On 4.5.2 the same issue is present even with mysql 5.7. I was waiting to use the 5.7 again with fix of the
#14840
and now runned into this one.
Error: ER_LOCK_DEADLOCK: Deadlock found when trying to get lock; try restarting transaction at Query.Sequence._packetToError (/srv/app/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14) at Query.ErrorPacket (/srv/app/node_modules/mysql/lib/protocol/sequences/Query.js:79:18) at Protocol._parsePacket (/srv/app/node_modules/mysql/lib/protocol/Protocol.js:291:23) at Parser._parsePacket (/srv/app/node_modules/mysql/lib/protocol/Parser.js:433:10) at Parser.write (/srv/app/node_modules/mysql/lib/protocol/Parser.js:43:10) at Protocol.write (/srv/app/node_modules/mysql/lib/protocol/Protocol.js:38:16) at Socket.<anonymous> (/srv/app/node_modules/mysql/lib/Connection.js:88:28) at Socket.<anonymous> (/srv/app/node_modules/mysql/lib/Connection.js:526:10) at Socket.emit (node:events:513:28) at Socket.emit (node:domain:489:12)
I got problem too when in 4.5.2. Acctually it happend from version 4.4.6. I got error when using navigation plugin with enable i18n. Please fix it :(
UPDATE navigations_localizations_links as a, ( SELECT id, ROW_NUMBER() OVER (PARTITION BY navigation_id ORDER BY navigation_order) AS src_order FROM navigations_localizations_links WHERE navigation_id = 1 ) AS b SET navigation_order = b.src_order WHERE b.id = a.id