We are facing the below issue, When we are trying to create bulk users by load testing ( from Jmeter) then getting above error.

Uncaught PHP Exception Drupal\\Core\\Entity\\EntityStorageException: "SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction: UPDATE {cachetags} SET invalidations=invalidations + 1\nWHERE tag = :db_condition_placeholder_0; Array\n(\n [:db_condition_placeholder_0] => 4xx-response\n)\n" at /core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php line 770

I have tried to find a solution also and look into the articles below but still not getting any solution.

https://drupal.stackexchange.com/questions/108588/how-to-get-rid-of-dead...

We have tried to add sleep(2) function in pre_save() hook (before save user) but still getting the same error. It seems that Drupal can't handle creating many entities concurrently.

Can any one have any solution for above issue?

Comments

sunilkansodiya created an issue. See original summary.

cilefen’s picture

Status: Active » Closed (duplicate)
Issue tags: -Drupal General error: 1205 Lock wait timeout exceeded
Related issues: +#3042268: SQLSTATE[HY000]: Ge neral error: 1205 Lock wait timeout exceeded; try restarting transaction

The SE accepted answer and that article it links to, and existing core issues all say to use read committed.