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]: GQL Token Update is Expensive #15464

Closed
markhuot opened this issue Aug 1, 2024 · 1 comment
Closed

[4.x]: GQL Token Update is Expensive #15464

markhuot opened this issue Aug 1, 2024 · 1 comment

Comments

@markhuot
Copy link
Contributor

markhuot commented Aug 1, 2024

What happened?

Description

We're running GQL under load and AWS RDS is complaining that we're spending a lot of time waiting because we're getting so many concurrent requests all trying to update the GQL Token's lastUsed value.

Screenshot 2024-08-01 at 3 59 44 PM

Steps to reproduce

  1. Send ~500 concurrent requests at a GQL endpoint
  2. Notice most of the time waiting for responses to return is spent waiting for MySQL to run the lastUsed UPDATE.

Expected behavior

If this is purely for tracking purposes it'd be great if there was a way to disable this update.

Actual behavior

There is no way to skip the update on every GQL request causing bottlenecking

Craft CMS version

4.9.5

PHP version

8.3

Operating system and version

Ubuntu

Database type and version

MySQL 8.0.27

Image driver and version

n/a

Installed plugins and versions

None relating to GQL

@brandonkelly
Copy link
Member

Just resolved this for Craft 4.11 and 5.3. Now the timestamp will only be updated if it hasn’t been updated in the past minute, which should cut down on the updated, at least once the first request has had a chance to finish updating the timestamp.

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