Skip to content

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

@markhuot

Description

@markhuot

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions