Skip to content

getPathsFromContext() with multiple types prone to deadlocks #93

Open
@lauriii

Description

@lauriii

I'm getting following exception fairly consistently when visiting any of the node pages:

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[HY000]: General error: 5 database is locked: INSERT INTO "oauth2_token" ("bundle", "uuid", "auth_user_id", "client", "value", "created", "changed", "expire", "status") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?); Array ( [0] => access_token [1] => ? [2] => ? [3] => ? [4] => ? [5] => ? [6] => ? [7] => ? [8] => ? ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->doSaveFieldItems() (line 940 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

This seems to be caused by how getPathsFromContext() is calling getResourceCollection() multiple times when multiple types are provided, leading into multiple calls for buildHeaders(). I haven't been able to reproduce this when calling getPathsFromContext() with a single type.

Reporting here instead of Simple OAuth since I haven't had a chance to research the root cause for this.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions