<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic PostrgeSQL : deadlock detecded in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/postrgesql-deadlock-detecded/m-p/320739#M7740</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I'm using Nuxeo 6.0-HF05 with a cluster of 2 nuxeo server. We are facing slow down of access in DM. When slow down appears I notice "deadlock detected" error in the Postgres log files (see logs below).&lt;/P&gt;
&lt;P&gt;Is there a way to avoid this behavior ? Is it a bug ? I can't reproduce it but it appears regularly in production.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;    2015-09-11 10:13:34 RET [5351]: [1-1] ERROR:  deadlock detected
    2015-09-11 10:13:34 RET [5351]: [2-1] DETAIL:  Process 5351 waits for ShareLock on transaction 72303514; blocked by process 9897.
    Process 9897 waits for ShareLock on transaction 72303486; blocked by process 5351.
    Process 5351: UPDATE "hierarchy" SET "mixintypes" = $1 WHERE "id" = $2
    Process 9897: INSERT INTO "documents_count_statistics" ("id", "childrencount", "descendantscount") VALUES ($1, $2, $3)
    2015-09-11 10:13:34 RET [5351]: [3-1] HINT:  See server log for query details.
    2015-09-11 10:13:34 RET [5351]: [4-1] STATEMENT:  UPDATE "hierarchy" SET "mixintypes" = $1 WHERE "id" = $2
    2015-09-11 10:13:34 RET [5351]: [5-1] ERROR:  current transaction is aborted, commands ignored until end of transaction block
    2015-09-11 10:13:34 RET [5351]: [6-1] STATEMENT:  SELECT "id", "name", "grant", "permission", "user", "group" FROM "acls" WHERE "id" IN ($1) ORDER BY "id", "pos"
    2015-09-11 10:13:34 RET [5351]: [7-1] ERROR:  current transaction is aborted, commands ignored until end of transaction block
    2015-09-11 10:13:34 RET [5351]: [8-1] STATEMENT:  INSERT INTO "hierarchy" ("id", "parentid", "pos", "name", "isproperty", "primarytype", "mixintypes", "ischeckedin", "baseversionid", "majorversion", "minorversion", "isversion") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12)
    2015-09-11 10:13:34 RET [5351]: [9-1] ERROR:  current transaction is aborted, commands ignored until end of transaction block
    2015-09-11 10:13:34 RET [5351]: [10-1] STATEMENT:  SELECT nx_update_read_acls()
    2015-09-11 10:13:35 RET [9410]: [53-1] LOG:  using stale statistics instead of current ones because stats collector is not responding
    2015-09-11 10:13:46 RET [9897]: [7-1] ERROR:  deadlock detected
    2015-09-11 10:13:46 RET [9897]: [8-1] DETAIL:  Process 9897 waits for ShareLock on transaction 72303598; blocked by process 9469.
    Process 9469 waits for ShareLock on transaction 72303514; blocked by process 9897.
    Process 9897: UPDATE "hierarchy" SET "mixintypes" = $1 WHERE "id" = $2
    Process 9469: INSERT INTO "documents_count_statistics" ("id", "childrencount", "descendantscount") VALUES ($1, $2, $3)
    2015-09-11 10:13:46 RET [9897]: [9-1] HINT:  See server log for query details.
    2015-09-11 10:13:46 RET [9897]: [10-1] STATEMENT:  UPDATE "hierarchy" SET "mixintypes" = $1 WHERE "id" = $2
    2015-09-11 10:13:47 RET [9897]: [11-1] ERROR:  current transaction is aborted, commands ignored until end of transaction block
    2015-09-11 10:13:47 RET [9897]: [12-1] STATEMENT:  SELECT "id", "name", "grant", "permission", "user", "group" FROM "acls" WHERE "id" IN ($1) ORDER BY "id", "pos"
    2015-09-11 10:13:48 RET [9897]: [13-1] ERROR:  current transaction is aborted, commands ignored until end of transaction block
    2015-09-11 10:13:48 RET [9897]: [14-1] STATEMENT:  INSERT INTO "hierarchy" ("id", "parentid", "pos", "name", "isproperty", "primarytype", "mixintypes", "ischeckedin", "baseversionid", "majorversion", "minorversion", "isversion") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12)
    2015-09-11 10:13:48 RET [9897]: [15-1] ERROR:  current transaction is aborted, commands ignored until end of transaction block
    2015-09-11 10:13:48 RET [9897]: [16-1] STATEMENT:  SELECT nx_update_read_acls()
    2015-09-11 10:13:55 RET [9410]: [54-1] LOG:  using stale statistics instead of current ones because stats collector is not responding
    2015-09-11 10:14:06 RET [9420]: [1-1] ERROR:  deadlock detected
    2015-09-11 10:14:06 RET [9420]: [2-1] DETAIL:  Process 9420 waits for ShareLock on transaction 72303598; blocked by process 9469.
    Process 9469 waits for ShareLock on transaction 72303684; blocked by process 9420.
    Process 9420: UPDATE "hierarchy" SET "mixintypes" = $1 WHERE "id" = $2
    Process 9469: INSERT INTO "documents_count_statistics" ("id", "childrencount", "descendantscount") VALUES ($1, $2, $3)
    2015-09-11 10:14:06 RET [9420]: [3-1] HINT:  See server log for query details.
    2015-09-11 10:14:06 RET [9420]: [4-1] STATEMENT:  UPDATE "hierarchy" SET "mixintypes" = $1 WHERE "id" = $2
    2015-09-11 10:14:06 RET [9420]: [5-1] ERROR:  current transaction is aborted, commands ignored until end of transaction block
    2015-09-11 10:14:06 RET [9420]: [6-1] STATEMENT:  SELECT "id", "name", "grant", "permission", "user", "group" FROM "acls" WHERE "id" IN ($1) ORDER BY "id", "pos"
    2015-09-11 10:14:06 RET [9420]: [7-1] ERROR:  current transaction is aborted, commands ignored until end of transaction block
    2015-09-11 10:14:06 RET [9420]: [8-1] STATEMENT:  INSERT INTO "hierarchy" ("id", "parentid", "pos", "name", "isproperty", "primarytype", "mixintypes", "ischeckedin", "baseversionid", "majorversion", "minorversion", "isversion") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12)
    2015-09-11 10:14:06 RET [9420]: [9-1] ERROR:  current transaction is aborted, commands ignored until end of transaction block
    2015-09-11 10:14:06 RET [9420]: [10-1] STATEMENT:  SELECT nx_update_read_acls()
    2015-09-11 10:14:07 RET [839]: [1-1] LOG:  using stale statistics instead of current ones because stats collector is not responding
    2015-09-11 10:14:13 RET [9469]: [1-1] ERROR:  deadlock detected
    2015-09-11 10:14:13 RET [9469]: [2-1] DETAIL:  Process 9469 waits for ShareLock on transaction 72304003; blocked by process 5337.
    Process 5337 waits for ShareLock on transaction 72303598; blocked by process 9469.
    Process 9469: UPDATE "hierarchy" SET "mixintypes" = $1 WHERE "id" = $2
    Process 5337: INSERT INTO "documents_count_statistics" ("id", "childrencount", "descendantscount") VALUES ($1, $2, $3)
    2015-09-11 10:14:13 RET [9469]: [3-1] HINT:  See server log for query details.
    2015-09-11 10:14:13 RET [9469]: [4-1] STATEMENT:  UPDATE "hierarchy" SET "mixintypes" = $1 WHERE "id" = $2
    2015-09-11 10:14:13 RET [9469]: [5-1] ERROR:  current transaction is aborted, commands ignored until end of transaction block
    2015-09-11 10:14:13 RET [9469]: [6-1] STATEMENT:  SELECT "id", "name", "grant", "permission", "user", "group" FROM "acls" WHERE "id" IN ($1) ORDER BY "id", "pos"
    2015-09-11 10:14:13 RET [9469]: [7-1] ERROR:  current transaction is aborted, commands ignored until end of transaction block
    2015-09-11 10:14:13 RET [9469]: [8-1] STATEMENT:  INSERT INTO "hierarchy" ("id", "parentid", "pos", "name", "isproperty", "primarytype", "mixintypes", "ischeckedin", "baseversionid", "majorversion", "minorversion", "isversion") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12)
    2015-09-11 10:14:13 RET [9469]: [9-1] ERROR:  current transaction is aborted, commands ignored until end of transaction block
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 11 Sep 2015 06:24:10 GMT</pubDate>
    <dc:creator>zyx974_</dc:creator>
    <dc:date>2015-09-11T06:24:10Z</dc:date>
    <item>
      <title>PostrgeSQL : deadlock detecded</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/postrgesql-deadlock-detecded/m-p/320739#M7740</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I'm using Nuxeo 6.0-HF05 with a cluster of 2 nuxeo server. We are facing slow down of access in DM. When slow down appears I notice "deadlock detected" error in the Postgres log files (see logs below).&lt;/P&gt;
&lt;P&gt;Is there a way to avoid this behavior ? Is it a bug ? I can't reproduce it but it appears regularly in production.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;    2015-09-11 10:13:34 RET [5351]: [1-1] ERROR:  deadlock detected
    2015-09-11 10:13:34 RET [5351]: [2-1] DETAIL:  Process 5351 waits for ShareLock on transaction 72303514; blocked by process 9897.
    Process 9897 waits for ShareLock on transaction 72303486; blocked by process 5351.
    Process 5351: UPDATE "hierarchy" SET "mixintypes" = $1 WHERE "id" = $2
    Process 9897: INSERT INTO "documents_count_statistics" ("id", "childrencount", "descendantscount") VALUES ($1, $2, $3)
    2015-09-11 10:13:34 RET [5351]: [3-1] HINT:  See server log for query details.
    2015-09-11 10:13:34 RET [5351]: [4-1] STATEMENT:  UPDATE "hierarchy" SET "mixintypes" = $1 WHERE "id" = $2
    2015-09-11 10:13:34 RET [5351]: [5-1] ERROR:  current transaction is aborted, commands ignored until end of transaction block
    2015-09-11 10:13:34 RET [5351]: [6-1] STATEMENT:  SELECT "id", "name", "grant", "permission", "user", "group" FROM "acls" WHERE "id" IN ($1) ORDER BY "id", "pos"
    2015-09-11 10:13:34 RET [5351]: [7-1] ERROR:  current transaction is aborted, commands ignored until end of transaction block
    2015-09-11 10:13:34 RET [5351]: [8-1] STATEMENT:  INSERT INTO "hierarchy" ("id", "parentid", "pos", "name", "isproperty", "primarytype", "mixintypes", "ischeckedin", "baseversionid", "majorversion", "minorversion", "isversion") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12)
    2015-09-11 10:13:34 RET [5351]: [9-1] ERROR:  current transaction is aborted, commands ignored until end of transaction block
    2015-09-11 10:13:34 RET [5351]: [10-1] STATEMENT:  SELECT nx_update_read_acls()
    2015-09-11 10:13:35 RET [9410]: [53-1] LOG:  using stale statistics instead of current ones because stats collector is not responding
    2015-09-11 10:13:46 RET [9897]: [7-1] ERROR:  deadlock detected
    2015-09-11 10:13:46 RET [9897]: [8-1] DETAIL:  Process 9897 waits for ShareLock on transaction 72303598; blocked by process 9469.
    Process 9469 waits for ShareLock on transaction 72303514; blocked by process 9897.
    Process 9897: UPDATE "hierarchy" SET "mixintypes" = $1 WHERE "id" = $2
    Process 9469: INSERT INTO "documents_count_statistics" ("id", "childrencount", "descendantscount") VALUES ($1, $2, $3)
    2015-09-11 10:13:46 RET [9897]: [9-1] HINT:  See server log for query details.
    2015-09-11 10:13:46 RET [9897]: [10-1] STATEMENT:  UPDATE "hierarchy" SET "mixintypes" = $1 WHERE "id" = $2
    2015-09-11 10:13:47 RET [9897]: [11-1] ERROR:  current transaction is aborted, commands ignored until end of transaction block
    2015-09-11 10:13:47 RET [9897]: [12-1] STATEMENT:  SELECT "id", "name", "grant", "permission", "user", "group" FROM "acls" WHERE "id" IN ($1) ORDER BY "id", "pos"
    2015-09-11 10:13:48 RET [9897]: [13-1] ERROR:  current transaction is aborted, commands ignored until end of transaction block
    2015-09-11 10:13:48 RET [9897]: [14-1] STATEMENT:  INSERT INTO "hierarchy" ("id", "parentid", "pos", "name", "isproperty", "primarytype", "mixintypes", "ischeckedin", "baseversionid", "majorversion", "minorversion", "isversion") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12)
    2015-09-11 10:13:48 RET [9897]: [15-1] ERROR:  current transaction is aborted, commands ignored until end of transaction block
    2015-09-11 10:13:48 RET [9897]: [16-1] STATEMENT:  SELECT nx_update_read_acls()
    2015-09-11 10:13:55 RET [9410]: [54-1] LOG:  using stale statistics instead of current ones because stats collector is not responding
    2015-09-11 10:14:06 RET [9420]: [1-1] ERROR:  deadlock detected
    2015-09-11 10:14:06 RET [9420]: [2-1] DETAIL:  Process 9420 waits for ShareLock on transaction 72303598; blocked by process 9469.
    Process 9469 waits for ShareLock on transaction 72303684; blocked by process 9420.
    Process 9420: UPDATE "hierarchy" SET "mixintypes" = $1 WHERE "id" = $2
    Process 9469: INSERT INTO "documents_count_statistics" ("id", "childrencount", "descendantscount") VALUES ($1, $2, $3)
    2015-09-11 10:14:06 RET [9420]: [3-1] HINT:  See server log for query details.
    2015-09-11 10:14:06 RET [9420]: [4-1] STATEMENT:  UPDATE "hierarchy" SET "mixintypes" = $1 WHERE "id" = $2
    2015-09-11 10:14:06 RET [9420]: [5-1] ERROR:  current transaction is aborted, commands ignored until end of transaction block
    2015-09-11 10:14:06 RET [9420]: [6-1] STATEMENT:  SELECT "id", "name", "grant", "permission", "user", "group" FROM "acls" WHERE "id" IN ($1) ORDER BY "id", "pos"
    2015-09-11 10:14:06 RET [9420]: [7-1] ERROR:  current transaction is aborted, commands ignored until end of transaction block
    2015-09-11 10:14:06 RET [9420]: [8-1] STATEMENT:  INSERT INTO "hierarchy" ("id", "parentid", "pos", "name", "isproperty", "primarytype", "mixintypes", "ischeckedin", "baseversionid", "majorversion", "minorversion", "isversion") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12)
    2015-09-11 10:14:06 RET [9420]: [9-1] ERROR:  current transaction is aborted, commands ignored until end of transaction block
    2015-09-11 10:14:06 RET [9420]: [10-1] STATEMENT:  SELECT nx_update_read_acls()
    2015-09-11 10:14:07 RET [839]: [1-1] LOG:  using stale statistics instead of current ones because stats collector is not responding
    2015-09-11 10:14:13 RET [9469]: [1-1] ERROR:  deadlock detected
    2015-09-11 10:14:13 RET [9469]: [2-1] DETAIL:  Process 9469 waits for ShareLock on transaction 72304003; blocked by process 5337.
    Process 5337 waits for ShareLock on transaction 72303598; blocked by process 9469.
    Process 9469: UPDATE "hierarchy" SET "mixintypes" = $1 WHERE "id" = $2
    Process 5337: INSERT INTO "documents_count_statistics" ("id", "childrencount", "descendantscount") VALUES ($1, $2, $3)
    2015-09-11 10:14:13 RET [9469]: [3-1] HINT:  See server log for query details.
    2015-09-11 10:14:13 RET [9469]: [4-1] STATEMENT:  UPDATE "hierarchy" SET "mixintypes" = $1 WHERE "id" = $2
    2015-09-11 10:14:13 RET [9469]: [5-1] ERROR:  current transaction is aborted, commands ignored until end of transaction block
    2015-09-11 10:14:13 RET [9469]: [6-1] STATEMENT:  SELECT "id", "name", "grant", "permission", "user", "group" FROM "acls" WHERE "id" IN ($1) ORDER BY "id", "pos"
    2015-09-11 10:14:13 RET [9469]: [7-1] ERROR:  current transaction is aborted, commands ignored until end of transaction block
    2015-09-11 10:14:13 RET [9469]: [8-1] STATEMENT:  INSERT INTO "hierarchy" ("id", "parentid", "pos", "name", "isproperty", "primarytype", "mixintypes", "ischeckedin", "baseversionid", "majorversion", "minorversion", "isversion") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12)
    2015-09-11 10:14:13 RET [9469]: [9-1] ERROR:  current transaction is aborted, commands ignored until end of transaction block
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 11 Sep 2015 06:24:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/postrgesql-deadlock-detecded/m-p/320739#M7740</guid>
      <dc:creator>zyx974_</dc:creator>
      <dc:date>2015-09-11T06:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: PostrgeSQL : deadlock detecded</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/postrgesql-deadlock-detecded/m-p/320740#M7741</link>
      <description>&lt;P&gt;What is logged in server.log for this?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2015 12:10:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/postrgesql-deadlock-detecded/m-p/320740#M7741</guid>
      <dc:creator>Florent_Guillau</dc:creator>
      <dc:date>2015-09-14T12:10:53Z</dc:date>
    </item>
    <item>
      <title>Re: PostrgeSQL : deadlock detecded</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/postrgesql-deadlock-detecded/m-p/320741#M7742</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Sorry, this is not an answer, but I dont know how to upload a file in a comment (there is a lot of log).&lt;/P&gt;
&lt;P&gt;server.log is attached.
Thank you !&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2015 12:23:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/postrgesql-deadlock-detecded/m-p/320741#M7742</guid>
      <dc:creator>zyx974_</dc:creator>
      <dc:date>2015-09-14T12:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: PostrgeSQL : deadlock detecded</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/postrgesql-deadlock-detecded/m-p/320742#M7743</link>
      <description>&lt;P&gt;The first thing I'd do is upgrade to the latest hotfix version, Nuxeo 6.0-HF05 is quite old and a number of tickets related to quota computation have been fixed, it may help.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2015 13:57:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/postrgesql-deadlock-detecded/m-p/320742#M7743</guid>
      <dc:creator>Florent_Guillau</dc:creator>
      <dc:date>2015-09-14T13:57:23Z</dc:date>
    </item>
  </channel>
</rss>

