Article - CS255556

Troubleshooting PostgreSQL "deadlock detected" errors in ThingWorx Platform

Modified: 21-Oct-2026   


Applies To

  • ThingWorx Platform 6.5 to 10.1

Description

  • How to detect database deadlocks on PostgreSQL
  • How to identify and resolve database deadlocks in ThingWorx Platform
  • Deadlock detected errors are present in <ThingworxStorage>\logs\ErrorLog.log
    • [L: ERROR][O:E.c.t.p.p.PostgresModelExceptionTranslator] [I: ] [U: user] [S: ] [P: ] [T: https-jsse-nio-8443-exec-68] ERROR: deadlock detected Detail: Process 2070762 waits for ShareLock on transaction 2551741986; blocked by process 2070732. Process 2070732 waits for ShareLock on transaction 2551741987; blocked by process 2070762. Hint: See server log for query details.   Where: while rechecking updated tuple (49,7) in relation \"user_model_properties\" SQL statement \"UPDATE user_model_properties SET entity_name = inserting_name, key = inserting_key, value = inserting_value WHERE entity_name = inserting_name AND key = inserting_key\" PL/pgSQL function upsert_user_properties(character varying,character varying,text) line 4 at SQL statement
      
      [L: ERROR] [O: E.c.t.p.p.PostgresDataExceptionTranslator] [I: ] [U: Administrator] [S: ] [P: ] [T: TWEventProcessor-391] ERROR: deadlock detected
        Detail: Process 3620368 waits for ShareLock on transaction 4065780402; blocked by process 3631818.
      Process 3631818 waits for ShareLock on transaction 4065779716; blocked by process 3620368.
        Hint: See server log for query details.
        Where: while deleting tuple (17831,69) in relation \"visibilitypermissions\""

     

    • PostgreSQL database logs show deadlock detected errors associated with blocked transactions:

      • ERROR:  deadlock detected","detail_log": "Process 1928545 waits for ShareLock on transaction 2238286592; blocked by process 1920037.\nProcess 1920037 waits for ShareLock on transaction 2238286557; blocked by process 1928545.\nProcess 1928545: select * from upsert_user_properties ($1,$2,$3) as result\nProcess 1920037: select * from upsert_user_properties ($1,$2,$3) as result","detail": "Process 1928545 waits for ShareLock on transaction 2238286592; blocked by process 1920037.\nProcess 1920037 waits for ShareLock on transaction 2238286557; blocked by process 1928545.","hint": "See server log for query details.","context": "while locking tuple (9,39) in relation \"user_model_properties\"\nSQL statement \"UPDATE user_model_properties SET entity_name = inserting_name, key = inserting_key, value = inserting_value WHERE entity_name = inserting_name AND key = inserting_key\"\nPL/pgSQL function upsert_user_properties(character varying,character varying,text) line 4 at SQL statement","statement": "select * from upsert_user_properties ($1,$2,$3) as result","LOCPATH": "/usr/lib/locale-2.35
        
        ERROR:  deadlock detected","detail_log": "Process 3154283 waits for ShareLock on transaction 4052871541; blocked by process 3154201.\nProcess 3154201 waits for AccessExclusiveLock on tuple (21209,3) of relation 33866 of database 32972; blocked by process 3154252.\nProcess 3154252 waits for ShareLock on transaction 4052872067; blocked by process 3154283.\nProcess 3154283: update Thing_model SET \"lastModifiedDate\" = $1 WHERE name = $2\nProcess 3154201: DELETE FROM visibilitypermissions WHERE \"entityId\"=(SELECT id FROM model_index WHERE entity_name=$1 AND entity_type=$2) AND \"isInstancePermission\"=$3\nProcess 315
    This is a printer-friendly version of Article 255556 and may be out of date. For the latest version click CS255556