explorer-backend icon indicating copy to clipboard operation
explorer-backend copied to clipboard

postgresql connections not closing

Open mmahut opened this issue 4 years ago • 2 comments

We are seeing a problem with postgresql connections not closing when using the latest release 3.2.1.

org.postgresql.util.PSQLException: ERROR: canceling statement due to user request
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2533)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2268)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:313)
        at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:448)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:369)
        at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:159)
        at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:109)
        at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
        at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
        at doobie.free.KleisliInterpreter$PreparedStatementInterpreter.$anonfun$executeQuery$2(kleisliinterpreter.scala:956)
        at doobie.free.KleisliInterpreter.$anonfun$primitive$2(kleisliinterpreter.scala:112)
        at monix.eval.internal.TaskRunLoop$.startFull(TaskRunLoop.scala:81)
        at monix.eval.internal.TaskRunLoop$.$anonfun$restartAsync$1(TaskRunLoop.scala:222)
        at cats.effect.internals.PoolUtils$$anon$2$$anon$3.run(PoolUtils.scala:52)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

It might be specific to following query, I did not reproduce the issue otherwise.

28646] STATEMENT:
        select coalesce(cast(sum(o.value) as bigint), 0) from node_outputs o
        left join (select i.box_id, i.main_chain from node_inputs i where i.main_chain = true) as i on o.box_id = i.box_id
        left join node_transactions tx on tx.id = o.tx_id
        where o.main_chain = true
          and tx.inclusion_height <= $1
          and (i.box_id is null or i.main_chain = false)
          and o.ergo_tree = $2

Please note we do have autocommited enabled on the database, so I'm not sure why we are seeing this so often.

mmahut avatar Sep 29 '20 17:09 mmahut

I think this might be related, we are seeing the slowness on the following request to our backends.

$ curl --header "Content-Type: application/json"   --request POST   --data '{"addresses":["9hD2Cw6yQL6zzrw3TFgKdwFkBdDdU3ro1xRFmjouDw4NYS2S5RD","9fgigZnyHFk4ckBSxYV2QBzfN7AsSPEDobwV7ji5r8qSSJWaavK","9iDocgmDsAxg4evEufhg52WKxG1mFRRjDZ2moeMDincfhMGMqxL","9hS1FrVMxdDuT3eft3ELcRpBaDGU1LcobQpvuFxJtg5A8QnDeNH","9gvFjpj2aVXy2zbB5iqTh4HEmWbbwrH32GKgsmeG1HnCMjP99K9","9egRFhsnVE6AUEZbkEb71AhbDvi1SNbfEVELKkAUCA5dhwjec58","9enYpBAZS1KPG56xeFvccHh7kLb5YdhdP1w56S69rCpCbjKmWoo","9heNStyYzVBAf5pHX52YdNRc4wJfbhcGGhCCtKr2Sxdz2Ddxj85","9h1pmFwrHvhjYHyZGb7T2GdaEMvYbHXDTUdVE6p3graCgUceX8B","9hS1SSoyovgQVDGxNvFmeXUAPMjkBG331hNjhXtWRUfYtSxCDnq","9eynkVKrhidUNiK8dpf43G8CJDVXpkRWQ7Yt1NyiVNyMPNsU97E","9fXv2mSZG9wriLA7iNcCBKGw5WzHoWxy8rFbT8qM7kGTVZJrXPx","9hd8ch3Ljd4aoQfHEGnBQBQfdXD9YsxMoE9oxbZvAR4hc1qKUSH","9fijgsnTeBMMzzmg6aucKscucXjdTJeA3LJkagf4GRewky6gBfj","9i9myiASkxhNoxduq81R9w6Ba12i26roc5G81iyBnqwcp5HQMdR","9fWSwxqB9DC2K6kvyonzvSEL3pXcyzaSu3LY5T5f8cvdPzqekpZ","9gPivkPjTgWsRtK21xKgmzzT4KJBUL39yscJtV4eKHR2m8Pr2ZH","9i2N2aVv78h2zp5szeQqnv6L8oVZfZEHz4dGeevFryT2Mrr9FBc","9ebXXPwdH1zZFGPVYNhw9XR6BVehW81SqTL76Gh9YjyzkovaPLz","9fVmH5v3CJu15H4cXuPHvWwytgV8VTt9NpA3bWY8ZtEL9ooHV3i","9gVuRRxgV55sA5BtXh9mHuRbKwt6Kwedncp24zRb2YUrUTHXh7E","9gLvEmGod9JpoGijMDjTwuJXd8KxjCs1ZJ6Bb9EwYtDuGx5wiVy","9hR6B4cMBsra7DijhhQwjiGubZQrzaqkxuEWgL3KkSSzxUAi3nh","9fQBzKp37GNUc6tL3RPwyv6XpYBdZWTmJuizEPxQRGhrXimex3S","9fyeri83yLPL6uh6BthB5W6Vui8ruAHfiAac42aih7ysFi4xXHB","9fuMBm2AiPTDjZRHDe1qRQJFqjVGm11DLDN9RBZbC7mYUs4T3Cc","9h7Lvm8gvtQU7DjoaHR349wG9HYfRWFUhTkdKY5agsXptAnKhTL","9hk6NQGZLKbsSqTToATyZ2dVveL7KHNnL8KDHCzRaBbUCTTkU7L","9fzYu58Fdv1gxswpFqGhipfWq9rwjgm4w4rQ4Woh6rpYVVbhish","9i3p7Xin86P1WAiDnszozkMXiPxu9ScKpBQxhuNietLrzNWP1Zd","9hupojov6D4djBj9SMk5AV4kstkp6C8Aq61Wig6g99tHTfb8BYq","9gprpuwMi6FdYNybE24Pq1WwURuVDYRX5HB9DXpqDL4stFGJ2TL","9eeMPuAqBw932f14GBTCPQjC4fBZJ7gowZSa5Fxfs6ttvrYR6N5","9iALoMZrXQZ2JxLeZ3rGn2te1WjjWBDfMPMtjyeRmTprWSuy6gV","9hroFzcWj1ecqu7DsyikZEptsxQmKrhxoEHwyYqkgMEnFa2FWzu","9gmmgDXCm2xmRp7nJjbTdAtUYbiSrZVeaLzfE2m4Zpo5d1hVghL","9iNWUWjuuv7mYJgy3n7D3xe2CR8Xq5co8QDXACz1aYaauaDYLyE","9gV8xgAExk1Tx2iJWRU7PtJ2ZW5MMiwtnDVhTDa7S7pS7WEWUwn","9fF18h8GcHYc4w2Chr8VjQHScodhTngnfySsLvsNeh9Xqb2pCc1","9hJkH8Lzci5siCMhj1s3NvZ3xQArYcPf6E2wJzvYJ6kGwpyEdax","9g2YKeVu1B1P3KEVYgh6hCzvfukvGGgk59ChaxVQeuSXtJ5wufe","9hpc4437ZEgYxaMSyAqGNmQYgGa18iBGBERdyXKgtCweELiPhwq","9hQiMM5aAxCcetZobVgtnrPHjwNrpNewMsxLeSQosNJSdcxGLNM","9ftdGU1bsDU6e1zkPMQCNmLqMo16KcVK63D4TG51pNgUUYdSNJr","9ei4MKnyu1vFSYteEXFGM4AnP6iB6VB8W5PMm8p2Aek4ABQcosf","9f5Vm1U5XNworPHNHdgeAm7d6eqGtQcrgcbWmc42Mv1r46JeC3K","9hpsXpjgZ9jVH8ruRMacod6mxVc196ZLJLBLBJmTkUqb8btaLQk","9iN9x8UVNRNSLec18D629eSgU1NB7TRPTcrGydHePGrG5nqFbbC","9f7PrpxfwsUKw3Y1fP5MQ1dyf3Gy8Pq5bBgWV1QqopQAEeXxcJB","9ehQfQU8sLNc5TwzwNaJNuSq4VcAtGdRuLVSfRWWy9thMjhxiXX"]}'   https://ergo-backend.yoroiwallet.com/api/v2/addresses/filterUsed

This request eventually dies without an answer, with the following errors on the backend side.

Oct 04 14:39:43 ergo-backend1 yoroi-ergo-backend-start[9577]: {"name":"yoroi-ergo-backend","hostname":"ergo-backend1","pid":9577,"req_id":"ab07b6d9-4530-43f0-b148-47ce7c19afc3","level":30,"msg":"POST /api/v2/addresses/filterUsed 400","time":"2020-10-04T14:39:43.396Z","v":0}
Oct 04 14:39:43 ergo-backend1 postgresql-start[9660]: [9660] ERROR:  canceling statement due to user request
Oct 04 14:39:43 ergo-backend1 postgresql-start[9660]: [9660] STATEMENT:
Oct 04 14:39:43 ergo-backend1 postgresql-start[9660]:         select a.token_id, a.box_id, a.token_id, a.value from node_assets a
Oct 04 14:39:43 ergo-backend1 postgresql-start[9660]:         inner join (
Oct 04 14:39:43 ergo-backend1 postgresql-start[9660]:           select o.box_id from node_outputs o
Oct 04 14:39:43 ergo-backend1 postgresql-start[9660]:           left join (select i.box_id, i.main_chain from node_inputs i where i.main_chain = true) as i on o.box_id = i.box_id
Oct 04 14:39:43 ergo-backend1 postgresql-start[9660]:           where o.main_chain = true
Oct 04 14:39:43 ergo-backend1 postgresql-start[9660]:             and (i.box_id is null or i.main_chain = false)
Oct 04 14:39:43 ergo-backend1 postgresql-start[9660]:             and o.ergo_tree = $1
Oct 04 14:39:43 ergo-backend1 postgresql-start[9660]:         ) as uo on uo.box_id = a.box_id
Oct 04 14:39:43 ergo-backend1 postgresql-start[9660]:                  
Oct 04 14:39:43 ergo-backend1 postgresql-start[9712]: [9712] ERROR:  canceling statement due to user request
Oct 04 14:39:43 ergo-backend1 postgresql-start[9712]: [9712] STATEMENT:
Oct 04 14:39:43 ergo-backend1 postgresql-start[9712]:         select a.token_id, a.box_id, a.token_id, a.value from node_assets a
Oct 04 14:39:43 ergo-backend1 postgresql-start[9712]:         inner join (
Oct 04 14:39:43 ergo-backend1 postgresql-start[9712]:           select o.box_id from node_outputs o
Oct 04 14:39:43 ergo-backend1 postgresql-start[9712]:           left join (select i.box_id, i.main_chain from node_inputs i where i.main_chain = true) as i on o.box_id = i.box_id
Oct 04 14:39:43 ergo-backend1 postgresql-start[9712]:           where o.main_chain = true
Oct 04 14:39:43 ergo-backend1 postgresql-start[9712]:             and (i.box_id is null or i.main_chain = false)
Oct 04 14:39:43 ergo-backend1 postgresql-start[9712]:             and o.ergo_tree = $1
Oct 04 14:39:43 ergo-backend1 postgresql-start[9712]:         ) as uo on uo.box_id = a.box_id
Oct 04 14:39:43 ergo-backend1 postgresql-start[9712]:                  
Oct 04 14:39:43 ergo-backend1 postgresql-start[10024]: [10024] FATAL:  terminating connection due to administrator command
Oct 04 14:39:43 ergo-backend1 postgresql-start[10024]: [10024] STATEMENT:
Oct 04 14:39:43 ergo-backend1 postgresql-start[10024]:         select a.token_id, a.box_id, a.token_id, a.value from node_assets a
Oct 04 14:39:43 ergo-backend1 postgresql-start[10024]:         inner join (
Oct 04 14:39:43 ergo-backend1 postgresql-start[10024]:           select o.box_id from node_outputs o
Oct 04 14:39:43 ergo-backend1 postgresql-start[10024]:           left join (select i.box_id, i.main_chain from node_inputs i where i.main_chain = true) as i on o.box_id = i.box_id
Oct 04 14:39:43 ergo-backend1 postgresql-start[10024]:           where o.main_chain = true
Oct 04 14:39:43 ergo-backend1 postgresql-start[10024]:             and (i.box_id is null or i.main_chain = false)
Oct 04 14:39:43 ergo-backend1 postgresql-start[10024]:             and o.ergo_tree = $1
Oct 04 14:39:43 ergo-backend1 postgresql-start[10024]:         ) as uo on uo.box_id = a.box_id
Oct 04 14:39:43 ergo-backend1 postgresql-start[10024]:                  
Oct 04 14:39:43 ergo-backend1 postgresql-start[30442]: [30442] LOG:  background worker "parallel worker" (PID 10024) exited with exit code 1
Oct 04 14:39:47 ergo-backend1 kernel: refused connection: IN=ens3 OUT= MAC=4e:b9:15:16:e3:da:64:c3:d6:0b:ef:f0:08:00 SRC=46.249.32.211 DST=64.225.1.246 LEN=40 TOS=0x00 PREC=0x00 TTL=243 ID=17940 PROTO=TCP SPT=42366 DPT=3389 WINDOW=1024 RES=0x00 SYN URGP=0 
Oct 04 14:39:53 ergo-backend1 kernel: refused connection: IN=ens3 OUT= MAC=4e:b9:15:16:e3:da:64:c3:d6:0b:ef:f0:08:00 SRC=45.129.33.82 DST=64.225.1.246 LEN=40 TOS=0x00 PREC=0x00 TTL=244 ID=17851 PROTO=TCP SPT=49726 DPT=6337 WINDOW=1024 RES=0x00 SYN URGP=0 
Oct 04 14:39:54 ergo-backend1 postgresql-start[9658]: [9658] ERROR:  canceling statement due to user request
Oct 04 14:39:54 ergo-backend1 postgresql-start[9658]: [9658] STATEMENT:
Oct 04 14:39:54 ergo-backend1 postgresql-start[9658]:         select coalesce(cast(sum(o.value) as bigint), 0) from node_outputs o
Oct 04 14:39:54 ergo-backend1 postgresql-start[9658]:         left join (select i.box_id, i.main_chain from node_inputs i where i.main_chain = true) as i on o.box_id = i.box_id
Oct 04 14:39:54 ergo-backend1 postgresql-start[9658]:         left join node_transactions tx on tx.id = o.tx_id
Oct 04 14:39:54 ergo-backend1 postgresql-start[9658]:         where o.main_chain = true
Oct 04 14:39:54 ergo-backend1 postgresql-start[9658]:           and tx.inclusion_height <= $1
Oct 04 14:39:54 ergo-backend1 postgresql-start[9658]:           and (i.box_id is null or i.main_chain = false)
Oct 04 14:39:54 ergo-backend1 postgresql-start[9658]:           and o.ergo_tree = $2
Oct 04 14:39:54 ergo-backend1 postgresql-start[9658]:         
Oct 04 14:39:54 ergo-backend1 postgresql-start[9712]: [9712] ERROR:  canceling statement due to user request
Oct 04 14:39:54 ergo-backend1 postgresql-start[9712]: [9712] STATEMENT:
Oct 04 14:39:54 ergo-backend1 postgresql-start[9712]:         select a.token_id, a.box_id, a.token_id, a.value from node_assets a
Oct 04 14:39:54 ergo-backend1 postgresql-start[9712]:         inner join (
Oct 04 14:39:54 ergo-backend1 postgresql-start[9712]:           select o.box_id from node_outputs o
Oct 04 14:39:54 ergo-backend1 postgresql-start[9712]:           left join (select i.box_id, i.main_chain from node_inputs i where i.main_chain = true) as i on o.box_id = i.box_id
Oct 04 14:39:54 ergo-backend1 postgresql-start[9712]:           where o.main_chain = true
Oct 04 14:39:54 ergo-backend1 postgresql-start[9712]:             and (i.box_id is null or i.main_chain = false)
Oct 04 14:39:54 ergo-backend1 postgresql-start[9712]:             and o.ergo_tree = $1
Oct 04 14:39:54 ergo-backend1 postgresql-start[9712]:         ) as uo on uo.box_id = a.box_id
Oct 04 14:39:54 ergo-backend1 postgresql-start[9712]:                  
Oct 04 14:39:54 ergo-backend1 postgresql-start[9649]: [9649] ERROR:  canceling statement due to user request
Oct 04 14:39:54 ergo-backend1 postgresql-start[9649]: [9649] STATEMENT:
Oct 04 14:39:54 ergo-backend1 postgresql-start[9649]:         select coalesce(cast(sum(o.value) as bigint), 0) from node_outputs o
Oct 04 14:39:54 ergo-backend1 postgresql-start[9649]:         left join (select i.box_id, i.main_chain from node_inputs i where i.main_chain = true) as i on o.box_id = i.box_id
Oct 04 14:39:54 ergo-backend1 postgresql-start[9649]:         left join node_transactions tx on tx.id = o.tx_id
Oct 04 14:39:54 ergo-backend1 postgresql-start[9649]:         where o.main_chain = true
Oct 04 14:39:54 ergo-backend1 postgresql-start[9649]:           and tx.inclusion_height <= $1
Oct 04 14:39:54 ergo-backend1 postgresql-start[9649]:           and (i.box_id is null or i.main_chain = false)
Oct 04 14:39:54 ergo-backend1 postgresql-start[9649]:           and o.ergo_tree = $2
Oct 04 14:39:54 ergo-backend1 postgresql-start[9649]:         
Oct 04 14:39:54 ergo-backend1 postgresql-start[10113]: [10113] FATAL:  terminating connection due to administrator command
Oct 04 14:39:54 ergo-backend1 postgresql-start[10113]: [10113] STATEMENT:
Oct 04 14:39:54 ergo-backend1 postgresql-start[10113]:         select coalesce(cast(sum(o.value) as bigint), 0) from node_outputs o
Oct 04 14:39:54 ergo-backend1 postgresql-start[10113]:         left join (select i.box_id, i.main_chain from node_inputs i where i.main_chain = true) as i on o.box_id = i.box_id
Oct 04 14:39:54 ergo-backend1 postgresql-start[10113]:         left join node_transactions tx on tx.id = o.tx_id
Oct 04 14:39:54 ergo-backend1 postgresql-start[10113]:         where o.main_chain = true
Oct 04 14:39:54 ergo-backend1 postgresql-start[10113]:           and tx.inclusion_height <= $1
Oct 04 14:39:54 ergo-backend1 postgresql-start[10113]:           and (i.box_id is null or i.main_chain = false)
Oct 04 14:39:54 ergo-backend1 postgresql-start[10113]:           and o.ergo_tree = $2
Oct 04 14:39:54 ergo-backend1 postgresql-start[10113]:         
Oct 04 14:39:54 ergo-backend1 postgresql-start[9660]: [9660] ERROR:  canceling statement due to user request
Oct 04 14:39:54 ergo-backend1 postgresql-start[9660]: [9660] STATEMENT:
Oct 04 14:39:54 ergo-backend1 postgresql-start[9660]:         select
Oct 04 14:39:54 ergo-backend1 postgresql-start[9660]:           o.box_id,
Oct 04 14:39:54 ergo-backend1 postgresql-start[9660]:           o.tx_id,
Oct 04 14:39:54 ergo-backend1 postgresql-start[9660]:           o.header_id,
Oct 04 14:39:54 ergo-backend1 postgresql-start[9660]:           o.value,
Oct 04 14:39:54 ergo-backend1 postgresql-start[9660]:           o.creation_height,
Oct 04 14:39:54 ergo-backend1 postgresql-start[9660]:           o.index,
Oct 04 14:39:54 ergo-backend1 postgresql-start[9660]:           o.ergo_tree,
Oct 04 14:39:54 ergo-backend1 postgresql-start[9660]:           o.address,
Oct 04 14:39:54 ergo-backend1 postgresql-start[9660]:           o.additional_registers,
Oct 04 14:39:54 ergo-backend1 postgresql-start[9660]:           o.timestamp,
Oct 04 14:39:54 ergo-backend1 postgresql-start[9660]:           o.main_chain,
Oct 04 14:39:54 ergo-backend1 postgresql-start[9660]:           case i.main_chain when false then null else i.tx_id end
Oct 04 14:39:54 ergo-backend1 postgresql-start[9660]:         from node_outputs o
Oct 04 14:39:54 ergo-backend1 postgresql-start[9660]:         left join node_inputs i on o.box_id = i.box_id
Oct 04 14:39:54 ergo-backend1 postgresql-start[9660]:         left join node_transactions tx on tx.id = o.tx_id
Oct 04 14:39:54 ergo-backend1 postgresql-start[9660]:         where o.main_chain = true and tx.inclusion_height <= $1 and o.ergo_tree = $2
Oct 04 14:39:54 ergo-backend1 postgresql-start[9660]:         offset $3 limit $4
Oct 04 14:39:54 ergo-backend1 postgresql-start[9660]:         
Oct 04 14:39:54 ergo-backend1 postgresql-start[9661]: [9661] ERROR:  canceling statement due to user request
Oct 04 14:39:54 ergo-backend1 postgresql-start[9661]: [9661] STATEMENT:
Oct 04 14:39:54 ergo-backend1 postgresql-start[9661]:         select coalesce(cast(sum(o.value) as bigint), 0) from node_outputs o
Oct 04 14:39:54 ergo-backend1 postgresql-start[9661]:         left join (select i.box_id, i.main_chain from node_inputs i where i.main_chain = true) as i on o.box_id = i.box_id
Oct 04 14:39:54 ergo-backend1 postgresql-start[9661]:         left join node_transactions tx on tx.id = o.tx_id
Oct 04 14:39:54 ergo-backend1 postgresql-start[9661]:         where o.main_chain = true
Oct 04 14:39:54 ergo-backend1 postgresql-start[9661]:           and tx.inclusion_height <= $1
Oct 04 14:39:54 ergo-backend1 postgresql-start[9661]:           and (i.box_id is null or i.main_chain = false)
Oct 04 14:39:54 ergo-backend1 postgresql-start[9661]:           and o.ergo_tree = $2
Oct 04 14:39:54 ergo-backend1 postgresql-start[9661]:         
Oct 04 14:39:54 ergo-backend1 postgresql-start[10107]: [10107] FATAL:  terminating connection due to administrator command
Oct 04 14:39:54 ergo-backend1 postgresql-start[10107]: [10107] STATEMENT:
Oct 04 14:39:54 ergo-backend1 postgresql-start[10107]:         select
Oct 04 14:39:54 ergo-backend1 postgresql-start[10107]:           o.box_id,
Oct 04 14:39:54 ergo-backend1 postgresql-start[10107]:           o.tx_id,
Oct 04 14:39:54 ergo-backend1 postgresql-start[10107]:           o.header_id,
Oct 04 14:39:54 ergo-backend1 postgresql-start[10107]:           o.value,
Oct 04 14:39:54 ergo-backend1 postgresql-start[10107]:           o.creation_height,
Oct 04 14:39:54 ergo-backend1 postgresql-start[10107]:           o.index,
Oct 04 14:39:54 ergo-backend1 postgresql-start[10107]:           o.ergo_tree,
Oct 04 14:39:54 ergo-backend1 postgresql-start[10107]:           o.address,
Oct 04 14:39:54 ergo-backend1 postgresql-start[10107]:           o.additional_registers,
Oct 04 14:39:54 ergo-backend1 postgresql-start[10107]:           o.timestamp,
Oct 04 14:39:54 ergo-backend1 postgresql-start[10107]:           o.main_chain,
Oct 04 14:39:54 ergo-backend1 postgresql-start[10107]:           case i.main_chain when false then null else i.tx_id end
Oct 04 14:39:54 ergo-backend1 postgresql-start[10107]:         from node_outputs o
Oct 04 14:39:54 ergo-backend1 postgresql-start[10107]:         left join node_inputs i on o.box_id = i.box_id
Oct 04 14:39:54 ergo-backend1 postgresql-start[10107]:         left join node_transactions tx on tx.id = o.tx_id
Oct 04 14:39:54 ergo-backend1 postgresql-start[10107]:         where o.main_chain = true and tx.inclusion_height <= $1 and o.ergo_tree = $2
Oct 04 14:39:54 ergo-backend1 postgresql-start[10107]:         offset $3 limit $4
Oct 04 14:39:54 ergo-backend1 postgresql-start[10107]:         
Oct 04 14:39:54 ergo-backend1 postgresql-start[30442]: [30442] LOG:  background worker "parallel worker" (PID 10113) exited with exit code 1
Oct 04 14:39:54 ergo-backend1 postgresql-start[30442]: [30442] LOG:  background worker "parallel worker" (PID 10107) exited with exit code 1
Oct 04 14:39:54 ergo-backend1 postgresql-start[10112]: [10112] FATAL:  terminating connection due to administrator command
Oct 04 14:39:54 ergo-backend1 postgresql-start[10112]: [10112] STATEMENT:
Oct 04 14:39:54 ergo-backend1 postgresql-start[10112]:         select coalesce(cast(sum(o.value) as bigint), 0) from node_outputs o
Oct 04 14:39:54 ergo-backend1 postgresql-start[10112]:         left join (select i.box_id, i.main_chain from node_inputs i where i.main_chain = true) as i on o.box_id = i.box_id
Oct 04 14:39:54 ergo-backend1 postgresql-start[10112]:         left join node_transactions tx on tx.id = o.tx_id
Oct 04 14:39:54 ergo-backend1 postgresql-start[10112]:         where o.main_chain = true
Oct 04 14:39:54 ergo-backend1 postgresql-start[10112]:           and tx.inclusion_height <= $1
Oct 04 14:39:54 ergo-backend1 postgresql-start[10112]:           and (i.box_id is null or i.main_chain = false)
Oct 04 14:39:54 ergo-backend1 postgresql-start[10112]:           and o.ergo_tree = $2
Oct 04 14:39:54 ergo-backend1 postgresql-start[10112]:         
Oct 04 14:39:54 ergo-backend1 postgresql-start[30442]: [30442] LOG:  background worker "parallel worker" (PID 10112) exited with exit code 1
Oct 04 14:39:54 ergo-backend1 postgresql-start[9653]: [9653] ERROR:  canceling statement due to user request
Oct 04 14:39:54 ergo-backend1 postgresql-start[9653]: [9653] STATEMENT:
Oct 04 14:39:54 ergo-backend1 postgresql-start[9653]:         select coalesce(cast(sum(o.value) as bigint), 0) from node_outputs o
Oct 04 14:39:54 ergo-backend1 postgresql-start[9653]:         left join (select i.box_id, i.main_chain from node_inputs i where i.main_chain = true) as i on o.box_id = i.box_id
Oct 04 14:39:54 ergo-backend1 postgresql-start[9653]:         left join node_transactions tx on tx.id = o.tx_id
Oct 04 14:39:54 ergo-backend1 postgresql-start[9653]:         where o.main_chain = true
Oct 04 14:39:54 ergo-backend1 postgresql-start[9653]:           and tx.inclusion_height <= $1
Oct 04 14:39:54 ergo-backend1 postgresql-start[9653]:           and (i.box_id is null or i.main_chain = false)
Oct 04 14:39:54 ergo-backend1 postgresql-start[9653]:           and o.ergo_tree = $2
Oct 04 14:39:54 ergo-backend1 postgresql-start[9653]:         
Oct 04 14:39:54 ergo-backend1 postgresql-start[10115]: [10115] FATAL:  terminating connection due to administrator command
Oct 04 14:39:54 ergo-backend1 postgresql-start[10115]: [10115] STATEMENT:
Oct 04 14:39:54 ergo-backend1 postgresql-start[10115]:         select coalesce(cast(sum(o.value) as bigint), 0) from node_outputs o
Oct 04 14:39:54 ergo-backend1 postgresql-start[10115]:         left join (select i.box_id, i.main_chain from node_inputs i where i.main_chain = true) as i on o.box_id = i.box_id
Oct 04 14:39:54 ergo-backend1 postgresql-start[10115]:         left join node_transactions tx on tx.id = o.tx_id
Oct 04 14:39:54 ergo-backend1 postgresql-start[10115]:         where o.main_chain = true
Oct 04 14:39:54 ergo-backend1 postgresql-start[10115]:           and tx.inclusion_height <= $1
Oct 04 14:39:54 ergo-backend1 postgresql-start[10115]:           and (i.box_id is null or i.main_chain = false)
Oct 04 14:39:54 ergo-backend1 postgresql-start[10115]:           and o.ergo_tree = $2
Oct 04 14:39:54 ergo-backend1 postgresql-start[10115]:         
Oct 04 14:39:54 ergo-backend1 postgresql-start[10114]: [10114] FATAL:  terminating connection due to administrator command
Oct 04 14:39:54 ergo-backend1 postgresql-start[10114]: [10114] STATEMENT:
Oct 04 14:39:54 ergo-backend1 postgresql-start[10114]:         select coalesce(cast(sum(o.value) as bigint), 0) from node_outputs o
Oct 04 14:39:54 ergo-backend1 postgresql-start[10114]:         left join (select i.box_id, i.main_chain from node_inputs i where i.main_chain = true) as i on o.box_id = i.box_id
Oct 04 14:39:54 ergo-backend1 postgresql-start[10114]:         left join node_transactions tx on tx.id = o.tx_id
Oct 04 14:39:54 ergo-backend1 postgresql-start[10114]:         where o.main_chain = true
Oct 04 14:39:54 ergo-backend1 postgresql-start[10114]:           and tx.inclusion_height <= $1
Oct 04 14:39:54 ergo-backend1 postgresql-start[10114]:           and (i.box_id is null or i.main_chain = false)
Oct 04 14:39:54 ergo-backend1 postgresql-start[10114]:           and o.ergo_tree = $2
Oct 04 14:39:54 ergo-backend1 postgresql-start[10114]:         
Oct 04 14:39:54 ergo-backend1 postgresql-start[30442]: [30442] LOG:  background worker "parallel worker" (PID 10114) exited with exit code 1
Oct 04 14:39:54 ergo-backend1 postgresql-start[30442]: [30442] LOG:  background worker "parallel worker" (PID 10115) exited with exit code 1
Oct 04 14:39:54 ergo-backend1 postgresql-start[9659]: [9659] ERROR:  canceling statement due to user request
Oct 04 14:39:54 ergo-backend1 postgresql-start[9659]: [9659] STATEMENT:
Oct 04 14:39:54 ergo-backend1 postgresql-start[9659]:         select coalesce(cast(sum(o.value) as bigint), 0) from node_outputs o
Oct 04 14:39:54 ergo-backend1 postgresql-start[9659]:         left join (select i.box_id, i.main_chain from node_inputs i where i.main_chain = true) as i on o.box_id = i.box_id
Oct 04 14:39:54 ergo-backend1 postgresql-start[9659]:         left join node_transactions tx on tx.id = o.tx_id
Oct 04 14:39:54 ergo-backend1 postgresql-start[9659]:         where o.main_chain = true
Oct 04 14:39:54 ergo-backend1 postgresql-start[9659]:           and tx.inclusion_height <= $1
Oct 04 14:39:54 ergo-backend1 postgresql-start[9659]:           and (i.box_id is null or i.main_chain = false)
Oct 04 14:39:54 ergo-backend1 postgresql-start[9659]:           and o.ergo_tree = $2
Oct 04 14:39:54 ergo-backend1 postgresql-start[9659]:         
Oct 04 14:39:54 ergo-backend1 postgresql-start[9654]: [9654] ERROR:  canceling statement due to user request
Oct 04 14:39:54 ergo-backend1 postgresql-start[9654]: [9654] STATEMENT:
Oct 04 14:39:54 ergo-backend1 postgresql-start[9654]:         select coalesce(cast(sum(o.value) as bigint), 0) from node_outputs o
Oct 04 14:39:54 ergo-backend1 postgresql-start[9654]:         left join (select i.box_id, i.main_chain from node_inputs i where i.main_chain = true) as i on o.box_id = i.box_id
Oct 04 14:39:54 ergo-backend1 postgresql-start[9654]:         left join node_transactions tx on tx.id = o.tx_id
Oct 04 14:39:54 ergo-backend1 postgresql-start[9654]:         where o.main_chain = true
Oct 04 14:39:54 ergo-backend1 postgresql-start[9654]:           and tx.inclusion_height <= $1
Oct 04 14:39:54 ergo-backend1 postgresql-start[9654]:           and (i.box_id is null or i.main_chain = false)
Oct 04 14:39:54 ergo-backend1 postgresql-start[9654]:           and o.ergo_tree = $2
Oct 04 14:39:54 ergo-backend1 postgresql-start[9654]:         
Oct 04 14:39:54 ergo-backend1 postgresql-start[10110]: [10110] FATAL:  terminating connection due to administrator command
Oct 04 14:39:54 ergo-backend1 postgresql-start[10110]: [10110] STATEMENT:
Oct 04 14:39:54 ergo-backend1 postgresql-start[10110]:         select coalesce(cast(sum(o.value) as bigint), 0) from node_outputs o
Oct 04 14:39:54 ergo-backend1 postgresql-start[10110]:         left join (select i.box_id, i.main_chain from node_inputs i where i.main_chain = true) as i on o.box_id = i.box_id
Oct 04 14:39:54 ergo-backend1 postgresql-start[10110]:         left join node_transactions tx on tx.id = o.tx_id
Oct 04 14:39:54 ergo-backend1 postgresql-start[10110]:         where o.main_chain = true
Oct 04 14:39:54 ergo-backend1 postgresql-start[10110]:           and tx.inclusion_height <= $1
Oct 04 14:39:54 ergo-backend1 postgresql-start[10110]:           and (i.box_id is null or i.main_chain = false)
Oct 04 14:39:54 ergo-backend1 postgresql-start[10110]:           and o.ergo_tree = $2
Oct 04 14:39:54 ergo-backend1 postgresql-start[10110]:         
Oct 04 14:39:54 ergo-backend1 postgresql-start[10111]: [10111] FATAL:  terminating connection due to administrator command
Oct 04 14:39:54 ergo-backend1 postgresql-start[10111]: [10111] STATEMENT:
Oct 04 14:39:54 ergo-backend1 postgresql-start[10111]:         select coalesce(cast(sum(o.value) as bigint), 0) from node_outputs o
Oct 04 14:39:54 ergo-backend1 postgresql-start[10111]:         left join (select i.box_id, i.main_chain from node_inputs i where i.main_chain = true) as i on o.box_id = i.box_id
Oct 04 14:39:54 ergo-backend1 postgresql-start[10111]:         left join node_transactions tx on tx.id = o.tx_id
Oct 04 14:39:54 ergo-backend1 postgresql-start[10111]:         where o.main_chain = true
Oct 04 14:39:54 ergo-backend1 postgresql-start[10111]:           and tx.inclusion_height <= $1
Oct 04 14:39:54 ergo-backend1 postgresql-start[10111]:           and (i.box_id is null or i.main_chain = false)
Oct 04 14:39:54 ergo-backend1 postgresql-start[10111]:           and o.ergo_tree = $2
Oct 04 14:39:54 ergo-backend1 postgresql-start[10111]:         
Oct 04 14:39:54 ergo-backend1 postgresql-start[30442]: [30442] LOG:  background worker "parallel worker" (PID 10110) exited with exit code 1
Oct 04 14:39:54 ergo-backend1 postgresql-start[30442]: [30442] LOG:  background worker "parallel worker" (PID 10111) exited with exit code 1
Oct 04 14:39:54 ergo-backend1 yoroi-ergo-backend-start[9577]: {"name":"yoroi-ergo-backend","hostname":"ergo-backend1","pid":9577,"req_id":"aff9a540-6969-46a7-a6ad-3298d5a79238","level":30,"msg":"POST /api/v2/addresses/filterUsed 400","time":"2020-10-04T14:39:54.645Z","v":0}
Oct 04 14:39:54 ergo-backend1 postgresql-start[9649]: [9649] ERROR:  canceling statement due to user request
Oct 04 14:39:54 ergo-backend1 postgresql-start[9649]: [9649] STATEMENT:
Oct 04 14:39:54 ergo-backend1 postgresql-start[9649]:         select coalesce(cast(sum(difficulty) as bigint), 0) from blocks_info
Oct 04 14:39:54 ergo-backend1 postgresql-start[9649]:         where timestamp >= $1
Oct 04 14:39:54 ergo-backend1 postgresql-start[9649]:         

When we use https://api.ergoplatform.com as the explorer api we are not seeing this problem.

mmahut avatar Oct 04 '20 14:10 mmahut

New schema https://github.com/ergoplatform/explorer-backend/commit/419467b4d432e75e15f468d72e97bf8dfa5ef227 did help a lot. I'm going to keep an eye on it and close if resolved.

mmahut avatar Oct 05 '20 17:10 mmahut