[SOLVED] Deadlock problem

2018-06-12 00:52:24 UTC [6261]: [1-1] user=[unknown],db=[unknown],app=[unknown],client=172.24.0.6 LOG:  connection received: host=172.24.0.6 port=43394
2018-06-12 00:52:24 UTC [6261]: [2-1] user=postgres,db=zammad_production,app=[unknown],client=172.24.0.6 LOG:  connection authorized: user=postgres database=zammad_production
2018-06-12 00:52:25 UTC [64]: [366-1] user=postgres,db=zammad_production,app=puma: cluster worker 5: 1 [zammad],client=172.24.0.6 LOG:  process 64 detected deadlock while waiting for ShareLock on transaction 13060920 after 1000.157 ms
2018-06-12 00:52:25 UTC [64]: [367-1] user=postgres,db=zammad_production,app=puma: cluster worker 5: 1 [zammad],client=172.24.0.6 DETAIL:  Process holding the lock: 79. Wait queue: .
2018-06-12 00:52:25 UTC [64]: [368-1] user=postgres,db=zammad_production,app=puma: cluster worker 5: 1 [zammad],client=172.24.0.6 CONTEXT:  while updating tuple (298,15) in relation "users"
2018-06-12 00:52:25 UTC [64]: [369-1] user=postgres,db=zammad_production,app=puma: cluster worker 5: 1 [zammad],client=172.24.0.6 STATEMENT:  UPDATE "users" SET "updated_at" = '2018-06-12 00:52:24.177000' WHERE "users"."id" = $1
2018-06-12 00:52:25 UTC [64]: [370-1] user=postgres,db=zammad_production,app=puma: cluster worker 5: 1 [zammad],client=172.24.0.6 ERROR:  deadlock detected
2018-06-12 00:52:25 UTC [64]: [371-1] user=postgres,db=zammad_production,app=puma: cluster worker 5: 1 [zammad],client=172.24.0.6 DETAIL:  Process 64 waits for ShareLock on transaction 13060920; blocked by process 79.
        Process 79 waits for ShareLock on transaction 13059412; blocked by process 64.
        Process 64: UPDATE "users" SET "updated_at" = '2018-06-12 00:52:24.177000' WHERE "users"."id" = $1
        Process 79: UPDATE "organizations" SET "updated_at" = '2018-06-12 00:52:22.039000' WHERE "organizations"."id" = $1
2018-06-12 00:52:25 UTC [64]: [372-1] user=postgres,db=zammad_production,app=puma: cluster worker 5: 1 [zammad],client=172.24.0.6 HINT:  See server log for query details.
2018-06-12 00:52:25 UTC [64]: [373-1] user=postgres,db=zammad_production,app=puma: cluster worker 5: 1 [zammad],client=172.24.0.6 CONTEXT:  while updating tuple (298,15) in relation "users"
2018-06-12 00:52:25 UTC [64]: [374-1] user=postgres,db=zammad_production,app=puma: cluster worker 5: 1 [zammad],client=172.24.0.6 STATEMENT:  UPDATE "users" SET "updated_at" = '2018-06-12 00:52:24.177000' WHERE "users"."id" = $1