You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a cluster set up for the process to spawn multiple annotation update threads for images found in the same project.
40-50 threads are running simultaneously to update annotation for images in the same project,
It looks like getting the database lock for project level counter is leading to deadlock as shown below.
So, is there any way to switch this to more thread safe mechanism?
Temporarily, we may need to comment out this code segment and switch to cron job to update counter for now.
Regards,
Detail: Process 326922 waits for AccessExclusiveLock on tuple (35,53) of relation 39586 of database 38367; blocked by process 326830.
Process 326830 waits for ShareLock on transaction 13883189; blocked by process 326743.
Process 326743 waits for ShareLock on transaction 13883206; blocked by process 326777.
Process 326777 waits for AccessExclusiveLock on tuple (35,53) of relation 39586 of database 38367; blocked by process 326922.
Hint: See server log for query details.
Where: SQL statement "SELECT * FROM project where id = NEW.project_id FOR UPDATE"
PL/pgSQL function beforeinsertuserannotation() line 8 at SQL statement
05-05-2021 01:00:01,984 ERROR SqlExceptionHelper - ERROR: deadlock detected
Detail: Process 326951 waits for AccessExclusiveLock on tuple (35,53) of relation 39586 of database 38367; blocked by process 326877.
Process 326877 waits for ShareLock on transaction 13883189; blocked by process 326743.
Process 326743 waits for ShareLock on transaction 13883206; blocked by process 326777.
The text was updated successfully, but these errors were encountered:
We have a cluster set up for the process to spawn multiple annotation update threads for images found in the same project.
40-50 threads are running simultaneously to update annotation for images in the same project,
It looks like getting the database lock for project level counter is leading to deadlock as shown below.
So, is there any way to switch this to more thread safe mechanism?
Temporarily, we may need to comment out this code segment and switch to cron job to update counter for now.
Regards,
Detail: Process 326922 waits for AccessExclusiveLock on tuple (35,53) of relation 39586 of database 38367; blocked by process 326830.
Process 326830 waits for ShareLock on transaction 13883189; blocked by process 326743.
Process 326743 waits for ShareLock on transaction 13883206; blocked by process 326777.
Process 326777 waits for AccessExclusiveLock on tuple (35,53) of relation 39586 of database 38367; blocked by process 326922.
Hint: See server log for query details.
Where: SQL statement "SELECT * FROM project where id = NEW.project_id FOR UPDATE"
PL/pgSQL function beforeinsertuserannotation() line 8 at SQL statement
05-05-2021 01:00:01,984 ERROR SqlExceptionHelper - ERROR: deadlock detected
Detail: Process 326951 waits for AccessExclusiveLock on tuple (35,53) of relation 39586 of database 38367; blocked by process 326877.
Process 326877 waits for ShareLock on transaction 13883189; blocked by process 326743.
Process 326743 waits for ShareLock on transaction 13883206; blocked by process 326777.
The text was updated successfully, but these errors were encountered: