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

DB Locking Investigation #563

Closed
iBotPeaches opened this issue Feb 25, 2023 · 2 comments
Closed

DB Locking Investigation #563

iBotPeaches opened this issue Feb 25, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@iBotPeaches
Copy link
Owner

[2023-02-25 20:06:12] production.ERROR: SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction (Connection: mysql, SQL: update `maps` set `thumbnail_url` = https://blobs-infiniteugc.svc.halowaypoint.com/ugcstorage/map/08607bf4-6abe-4a5b-9547-290a6cc1433e/0476b942-c2a8-482d-ae3e-c2aa4c8c72c3/images/thumbnail.png where `id` = 49) {"exception":"[object] (Illuminate\\Database\\QueryException(code: HY000): SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction (Connection: mysql, SQL: update `maps` set `thumbnail_url` = https://blobs-infiniteugc.svc.halowaypoint.com/ugcstorage/map/08607bf4-6abe-4a5b-9547-290a6cc1433e/0476b942-c2a8-482d-ae3e-c2aa4c8c72c3/images/thumbnail.png where `id` = 49) at /home/leafapp/deploy/releases/164/vendor/laravel/framework/src/Illuminate/Database/Connection.php:760)
[stacktrace]
@iBotPeaches iBotPeaches added the bug Something isn't working label Feb 25, 2023
@iBotPeaches
Copy link
Owner Author

Same as this one - #612. Need to redo our locking. We transaction the entire process into one large chunk, but the metadata doesn't need that. We should:

  • move metadata to only insert if new and let the the cron metadata insert it
  • used sharedLock for any Game/GamePlayer updates

This should cut down on actions that updates do and prevent the locking. Also we could

  • remove thumbnail_url from playlist - we never use it
  • introduce force (bool) on fromHaloDotApi() so we can opt into an update w/ metadata, but just find the element with the updates.

@iBotPeaches
Copy link
Owner Author

This was also resolved with the move to v8. We look up Levels, Playlists, Categories from API so we no longer thrash the system with saves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant