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

[4.x]: [web.ERROR] [yii\db\Exception] SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction #14113

Closed
DTesch-Level-R opened this issue Jan 8, 2024 · 4 comments

Comments

@DTesch-Level-R
Copy link

DTesch-Level-R commented Jan 8, 2024

What happened?

Description

When updating an Entry, with lots of Neo fields (with children), via a mutation I get this error:
[web.ERROR] [yii\db\Exception] SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction

It happens mainly when making the request twice, before the initial request is finished.

Edit: It happens only when the session component is set to redis-Driver.
Edit: It also happens when I call the GraphQL Endpoint from my Nuxt-App.

Steps to reproduce

  1. GraphiQL Playground
  2. Set session component to redis-Driver.
  3. Mutate/Update an entry with lots of Neo fields (with children)
  4. Hit the play button 2-3 times fast
  5. Error: [web.ERROR] [yii\db\Exception] SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction
  6. The process/lockfile seems to only get released when I restart the server

Expected behavior

Saving the entry after lock file releases.

Actual behavior

[web.ERROR] [yii\db\Exception] SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction

Craft CMS version

4.5.14

PHP version

8.0.11

Operating system and version

Unix

Database type and version

mysql 8

Image driver and version

No response

Installed plugins and versions

  • Neo 4.0.2
@brandonkelly
Copy link
Member

Can you post the full stack trace for the error? (It should be in storage/logs/web-XXXX-XX-XX.log.)

@DTesch-Level-R
Copy link
Author

DTesch-Level-R commented Jan 9, 2024

Can you post the full stack trace for the error? (It should be in storage/logs/web-XXXX-XX-XX.log.)

Is this enough?
stacktrace.log

@DTesch-Level-R
Copy link
Author

That was fast.

Thank you! 😃

@brandonkelly
Copy link
Member

Craft 4.5.15 and 4.6.0 are out with a fix for that: now we ensure the entire element save process is protected by a mutex lock, like we do for non-GraphQL save requests already.

Thanks for reporting!

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

No branches or pull requests

2 participants