cardano-foundation / cardano-graphql

GraphQL API for Cardano
Apache License 2.0
262 stars 104 forks source link

cardano-graphql Connection reset by peer / graphql-port not answering requests but cardano-node and dbsync are fully synched. #642

Open pyromaniac3010 opened 2 years ago

pyromaniac3010 commented 2 years ago

Environment

The CLI can be used to gather generic information about your system to assist with support. No installation is required thanks to npx

npx @cardano-graphql/cli system-info

{
  os: {
    arch: 'x64',
    cpus: { count: 4, model: 'AMD EPYC 7571' },
    release: '5.10.75-79.358.amzn2.x86_64',
    totalMem: 33268535296,
    type: 'Linux'
  },
  version: '6.1.0'
}

Alternatively, what release or Git revision are you using:

Platform

"Amazon Linux 2"

Runtime

Runtime version:

node -v
v12.22.8
docker version
Client:
 Version:           20.10.7
 API version:       1.41
 Go version:        go1.15.14
 Git commit:        f0df350
 Built:             Wed Nov 17 03:05:36 2021
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          20.10.7
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.15.14
  Git commit:       b0f5bc3
  Built:            Wed Nov 17 03:06:14 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.6
  GitCommit:        d71fcd7d8303cbf684402823e425e9dd2e99285d
 runc:
  Version:          1.0.0
  GitCommit:        84113eef6fc27af1b01b3181f31bbaf708715301
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Steps to reproduce the bug

I installed cardano-graphql 6.1.0 via docker-compose stack and RESTORE_SNAPSHOT=https://update-cardano-mainnet.iohk.io/cardano-db-sync/12/db-sync-snapshot-schema-12-block-6590499-x86_64.tgz

After starting the stack and wating 3 days, the cardano-node and cardano-db-sync-extended are fully synched (checked via postgres-query "select now () - max (time) as behind_by from block ; ". So I tried to get graphql responses via curl as stated in the docs. But I always get Connection reset by peer:

curl   -X POST   -H "Content-Type: application/json"   -d '{"query": "{ cardanoDbMeta { initialized syncPercentage }}"}'   http://localhost:3100/graphql
curl: (56) Recv failure: Connection reset by peer

All containers are up and running:

docker-compose ps
NAME                                         COMMAND                  SERVICE                    STATUS              PORTS
cardano-graphql-cardano-db-sync-extended-1   "/nix/store/5ghw8rqx…"   cardano-db-sync-extended   running
cardano-graphql-cardano-graphql-1            "node index.js"          cardano-graphql            running             0.0.0.0:3100->3100/tcp, :::3100->3100/tcp
cardano-graphql-cardano-node-ogmios-1        "bash cardano-node-o…"   cardano-node-ogmios        running             0.0.0.0:1337->1337/tcp, :::1337->1337/tcp
cardano-graphql-hasura-1                     "docker-entrypoint.s…"   hasura                     running             0.0.0.0:8090->8080/tcp, :::8090->8080/tcp
cardano-graphql-postgres-1                   "docker-entrypoint.s…"   postgres                   running             0.0.0.0:5432->5432/tcp, :::5432->5432/tcp

The only errors I see in docker logs are coming from postgres-container:

docker-compose logs --tail 10
cardano-graphql-hasura-1  | {"type":"http-log","timestamp":"2021-12-20T13:12:38.950+0000","level":"info","detail":{"operation":{"query_execution_time":2.3153323e-2,"user_vars":{"x-hasura-role":"cardano-graphql"},"request_id":"430ff5d1-9317-46b2-8756-3c06445b6b37","response_size":2570,"request_read_time":1.359e-5},"http_info":{"status":200,"http_version":"HTTP/1.1","url":"/v1/graphql","ip":"172.19.0.4","method":"POST","content_encoding":"gzip"}}}
cardano-graphql-hasura-1  | {"type":"http-log","timestamp":"2021-12-20T13:12:43.938+0000","level":"info","detail":{"operation":{"query_execution_time":2.5402049e-2,"user_vars":{"x-hasura-role":"cardano-graphql"},"request_id":"4b6edfea-c9f9-4a30-91e2-526f6f73f77b","response_size":3271,"request_read_time":1.367e-5},"http_info":{"status":200,"http_version":"HTTP/1.1","url":"/v1/graphql","ip":"172.19.0.4","method":"POST","content_encoding":"gzip"}}}
cardano-graphql-hasura-1  | {"type":"http-log","timestamp":"2021-12-20T13:12:43.938+0000","level":"info","detail":{"operation":{"query_execution_time":8.603813e-3,"user_vars":{"x-hasura-role":"cardano-graphql"},"request_id":"b6cbb2a4-ee8e-477e-a589-ee93e7bb7438","response_size":203,"request_read_time":7.37e-6},"http_info":{"status":200,"http_version":"HTTP/1.1","url":"/v1/graphql","ip":"172.19.0.4","method":"POST","content_encoding":"gzip"}}}
cardano-graphql-hasura-1  | {"type":"http-log","timestamp":"2021-12-20T13:12:43.938+0000","level":"info","detail":{"operation":{"query_execution_time":1.062273e-3,"user_vars":{"x-hasura-role":"cardano-graphql"},"request_id":"b26574be-c197-47ea-9f71-7431033ef1ba","response_size":42,"request_read_time":8.32e-6},"http_info":{"status":200,"http_version":"HTTP/1.1","url":"/v1/graphql","ip":"172.19.0.4","method":"POST","content_encoding":"gzip"}}}
cardano-graphql-hasura-1  | {"type":"http-log","timestamp":"2021-12-20T13:12:43.938+0000","level":"info","detail":{"operation":{"query_execution_time":4.735713e-3,"user_vars":{"x-hasura-role":"cardano-graphql"},"request_id":"43c5138f-bf31-407d-8429-4114a76657c5","response_size":203,"request_read_time":5.26e-6},"http_info":{"status":200,"http_version":"HTTP/1.1","url":"/v1/graphql","ip":"172.19.0.4","method":"POST","content_encoding":"gzip"}}}
cardano-graphql-hasura-1  | {"type":"http-log","timestamp":"2021-12-20T13:12:43.938+0000","level":"info","detail":{"operation":{"query_execution_time":6.96332e-4,"user_vars":{"x-hasura-role":"cardano-graphql"},"request_id":"f8d3d83d-d516-4e22-bda5-9f49758effda","response_size":109,"request_read_time":7.19e-6},"http_info":{"status":200,"http_version":"HTTP/1.1","url":"/v1/graphql","ip":"172.19.0.4","method":"POST","content_encoding":"gzip"}}}
cardano-graphql-hasura-1  | {"type":"http-log","timestamp":"2021-12-20T13:12:43.938+0000","level":"info","detail":{"operation":{"query_execution_time":5.77172e-4,"user_vars":{"x-hasura-role":"cardano-graphql"},"request_id":"0112186b-0286-4012-9940-536d49192600","response_size":42,"request_read_time":6.27e-6},"http_info":{"status":200,"http_version":"HTTP/1.1","url":"/v1/graphql","ip":"172.19.0.4","method":"POST","content_encoding":"gzip"}}}
cardano-graphql-hasura-1  | {"type":"http-log","timestamp":"2021-12-20T13:12:49.675+0000","level":"info","detail":{"operation":{"query_execution_time":5.4099029e-2,"user_vars":{"x-hasura-role":"cardano-graphql"},"request_id":"fa01be5f-3f31-4dad-84a0-5fa804c6ecdb","response_size":3649,"request_read_time":1.65e-5},"http_info":{"status":200,"http_version":"HTTP/1.1","url":"/v1/graphql","ip":"172.19.0.4","method":"POST","content_encoding":"gzip"}}}
cardano-graphql-hasura-1  | {"type":"http-log","timestamp":"2021-12-20T13:12:54.659+0000","level":"info","detail":{"operation":{"query_execution_time":7.4886477e-2,"user_vars":{"x-hasura-role":"cardano-graphql"},"request_id":"154fbb0b-41c1-44c5-9e25-cb2bb2b861f5","response_size":3798,"request_read_time":1.987e-5},"http_info":{"status":200,"http_version":"HTTP/1.1","url":"/v1/graphql","ip":"172.19.0.4","method":"POST","content_encoding":"gzip"}}}
cardano-graphql-hasura-1  | {"type":"http-log","timestamp":"2021-12-20T13:12:58.973+0000","level":"info","detail":{"operation":{"query_execution_time":2.7090464e-2,"user_vars":{"x-hasura-role":"cardano-graphql"},"request_id":"e84afd68-e5e4-41ac-bea0-6975700385b6","response_size":4063,"request_read_time":1.362e-5},"http_info":{"status":200,"http_version":"HTTP/1.1","url":"/v1/graphql","ip":"172.19.0.4","method":"POST","content_encoding":"gzip"}}}
cardano-graphql-cardano-db-sync-extended-1  | [db-sync-node:Info:58] [2021-12-20 13:10:37.23 UTC] insertShelleyBlock(Alonzo): epoch 309, slot 48439545, block 6651743, hash d62cf7eb0f481edb7cdf944536c73f984f25eab5bbff2211d9523b78c67f3213
cardano-graphql-cardano-db-sync-extended-1  | [db-sync-node:Info:58] [2021-12-20 13:11:01.19 UTC] insertShelleyBlock(Alonzo): epoch 309, slot 48439568, block 6651744, hash 52808663d5fb45581d4b9d05a63f6e5ba6178b1846331c94862763424ff3652f
cardano-graphql-cardano-db-sync-extended-1  | [db-sync-node:Info:58] [2021-12-20 13:11:03.14 UTC] insertShelleyBlock(Alonzo): epoch 309, slot 48439571, block 6651745, hash ea51b8ac805672bebd24da7a8586bee03992074910eca30824ed71496505caff
cardano-graphql-cardano-db-sync-extended-1  | [db-sync-node:Info:58] [2021-12-20 13:11:45.63 UTC] insertShelleyBlock(Alonzo): epoch 309, slot 48439611, block 6651746, hash 9b1d944719ecae0d116aea31659e961a1d5199121ec1a7fe36de60e6ab80f05c
cardano-graphql-cardano-db-sync-extended-1  | [db-sync-node:Info:58] [2021-12-20 13:12:12.12 UTC] insertShelleyBlock(Alonzo): epoch 309, slot 48439639, block 6651747, hash a1a32d226b7748de20ce4eab41ebf42c149b5439d2f4edae5464d7fdf0cafcd4
cardano-graphql-cardano-db-sync-extended-1  | [db-sync-node:Info:58] [2021-12-20 13:12:14.04 UTC] insertShelleyBlock(Alonzo): epoch 309, slot 48439640, block 6651748, hash 1ca72b1b61df6866eb3d6d1e7912181ae7944f1f1229bc6a07024c5f45fb613e
cardano-graphql-cardano-db-sync-extended-1  | [db-sync-node:Info:58] [2021-12-20 13:12:17.38 UTC] insertShelleyBlock(Alonzo): epoch 309, slot 48439645, block 6651749, hash d46efb0f6f935b0184016da138309f5bcfa485204d2ff191106f38a7770b19a8
cardano-graphql-cardano-db-sync-extended-1  | [db-sync-node:Info:58] [2021-12-20 13:12:45.86 UTC] insertShelleyBlock(Alonzo): epoch 309, slot 48439673, block 6651750, hash b8ce0cde7477d14aef3e529d727a41edbda65c2b6bf93a962bbdb08bcb896497
cardano-graphql-cardano-db-sync-extended-1  | [db-sync-node:Info:58] [2021-12-20 13:12:47.54 UTC] Offline pool metadata fetch: 54 results, 46 fetch errors
cardano-graphql-cardano-db-sync-extended-1  | [db-sync-node:Info:58] [2021-12-20 13:12:50.43 UTC] insertShelleyBlock(Alonzo): epoch 309, slot 48439678, block 6651751, hash f8d9e3a4dfa3abda23044fac82c3d90054abf3c5cfa6ec4f74acac874d1d525d
cardano-graphql-cardano-graphql-1           | {"name":"cardano-graphql","hostname":"ed713c7a8161","pid":1,"level":30,"module":"HasuraClient","assetId":"5d09d0f4780d0db13ba0c9d97840dce6456768655fb9c41636130bf9696e717569736974697665","msg":"Adding metadata to asset","time":"2021-12-20T13:10:57.865Z","v":0}
cardano-graphql-cardano-graphql-1           | {"name":"cardano-graphql","hostname":"ed713c7a8161","pid":1,"level":30,"module":"HasuraClient","assetId":"5d09d0f4780d0db13ba0c9d97840dce6456768655fb9c41636130bf96a6f626a65657a6564","msg":"Adding metadata to asset","time":"2021-12-20T13:10:57.877Z","v":0}
cardano-graphql-cardano-graphql-1           | {"name":"cardano-graphql","hostname":"ed713c7a8161","pid":1,"level":30,"module":"HasuraClient","assetId":"5d09d0f4780d0db13ba0c9d97840dce6456768655fb9c41636130bf96d6963726f70686f626963","msg":"Adding metadata to asset","time":"2021-12-20T13:10:57.889Z","v":0}
cardano-graphql-cardano-graphql-1           | {"name":"cardano-graphql","hostname":"ed713c7a8161","pid":1,"level":30,"module":"HasuraClient","assetId":"01332334e96294ad39016bc8fa1e40ec05d601e9e27a83942739fe78474843","msg":"Adding metadata to asset","time":"2021-12-20T13:10:57.901Z","v":0}
cardano-graphql-cardano-graphql-1           | {"name":"cardano-graphql","hostname":"ed713c7a8161","pid":1,"level":30,"module":"HasuraClient","assetId":"923b89ef713c0dbc615b60402d39f90d89b4a16ad78638544624951a6d6f726e696e677669626573","msg":"Adding metadata to asset","time":"2021-12-20T13:10:57.911Z","v":0}
cardano-graphql-cardano-graphql-1           | {"name":"cardano-graphql","hostname":"ed713c7a8161","pid":1,"level":30,"module":"HasuraClient","assetId":"fee42cbf08b36928503f4711bb7f3b7439a4fa9ad1afc729a8a09dcf434b45584e46543031","msg":"Adding metadata to asset","time":"2021-12-20T13:10:57.921Z","v":0}
cardano-graphql-cardano-graphql-1           | {"name":"cardano-graphql","hostname":"ed713c7a8161","pid":1,"level":30,"module":"HasuraClient","assetId":"fee42cbf08b36928503f4711bb7f3b7439a4fa9ad1afc729a8a09dcf434b45584e46543032","msg":"Adding metadata to asset","time":"2021-12-20T13:10:57.931Z","v":0}
cardano-graphql-cardano-graphql-1           | {"name":"cardano-graphql","hostname":"ed713c7a8161","pid":1,"level":30,"module":"HasuraClient","assetId":"fee42cbf08b36928503f4711bb7f3b7439a4fa9ad1afc729a8a09dcf434b45584e46543033","msg":"Adding metadata to asset","time":"2021-12-20T13:10:57.941Z","v":0}
cardano-graphql-cardano-graphql-1           | {"name":"cardano-graphql","hostname":"ed713c7a8161","pid":1,"level":30,"module":"HasuraClient","assetId":"fee42cbf08b36928503f4711bb7f3b7439a4fa9ad1afc729a8a09dcf434b45584e46543034","msg":"Adding metadata to asset","time":"2021-12-20T13:10:57.952Z","v":0}
cardano-graphql-cardano-graphql-1           | {"name":"cardano-graphql","hostname":"ed713c7a8161","pid":1,"level":30,"module":"HasuraClient","assetId":"cc1e2dd207e0042283fbaad2e2082d41cc9f93211773814ac6177b99466972737443617264616e6f53757266626f617264","msg":"Adding metadata to asset","time":"2021-12-20T13:10:57.962Z","v":0}
cardano-graphql-cardano-node-ogmios-1       | [cc159471:cardano.node.ChainDB:Notice:148] [2021-12-20 13:11:43.87 UTC] Chain extended, new tip: 9b1d944719ecae0d116aea31659e961a1d5199121ec1a7fe36de60e6ab80f05c at slot 48439611
cardano-graphql-cardano-node-ogmios-1       | {"severity":"Info","timestamp":"2021-12-20T13:11:43.887617249Z","thread":"39","message":{"tag":"OgmiosHealth","healthCheck":{"tag":"HealthTick","status":{"startTime":"2021-12-17T12:02:44.809469603Z","lastKnownTip":{"slot":48439611,"hash":"9b1d944719ecae0d116aea31659e961a1d5199121ec1a7fe36de60e6ab80f05c","blockNo":6651746},"lastTipUpdate":"2021-12-20T13:11:43.882241374Z","networkSynchronization":0.99999,"currentEra":"Alonzo","metrics":{"activeConnections":3,"totalConnections":3,"totalUnrouted":0,"sessionDurations":{"mean":0,"min":0,"max":0},"runtimeStats":{"currentHeapSize":2034,"gcCpuTime":530463395579,"cpuTime":7240853045541,"maxHeapSize":12419},"totalMessages":6653464}}}},"version":"v4.2.1"}
cardano-graphql-cardano-node-ogmios-1       | [cc159471:cardano.node.ChainDB:Notice:148] [2021-12-20 13:12:10.88 UTC] Chain extended, new tip: a1a32d226b7748de20ce4eab41ebf42c149b5439d2f4edae5464d7fdf0cafcd4 at slot 48439639
cardano-graphql-cardano-node-ogmios-1       | {"severity":"Info","timestamp":"2021-12-20T13:12:10.901970027Z","thread":"39","message":{"tag":"OgmiosHealth","healthCheck":{"tag":"HealthTick","status":{"startTime":"2021-12-17T12:02:44.809469603Z","lastKnownTip":{"slot":48439639,"hash":"a1a32d226b7748de20ce4eab41ebf42c149b5439d2f4edae5464d7fdf0cafcd4","blockNo":6651747},"lastTipUpdate":"2021-12-20T13:12:10.899138079Z","networkSynchronization":0.99999,"currentEra":"Alonzo","metrics":{"activeConnections":3,"totalConnections":3,"totalUnrouted":0,"sessionDurations":{"mean":0,"min":0,"max":0},"runtimeStats":{"currentHeapSize":2030,"gcCpuTime":530509375730,"cpuTime":7240918748931,"maxHeapSize":12419},"totalMessages":6653465}}}},"version":"v4.2.1"}
cardano-graphql-cardano-node-ogmios-1       | {"severity":"Info","timestamp":"2021-12-20T13:12:11.18941915Z","thread":"39","message":{"tag":"OgmiosHealth","healthCheck":{"tag":"HealthTick","status":{"startTime":"2021-12-17T12:02:44.809469603Z","lastKnownTip":{"slot":48439640,"hash":"1ca72b1b61df6866eb3d6d1e7912181ae7944f1f1229bc6a07024c5f45fb613e","blockNo":6651748},"lastTipUpdate":"2021-12-20T13:12:11.18912763Z","networkSynchronization":1.00000,"currentEra":"Alonzo","metrics":{"activeConnections":3,"totalConnections":3,"totalUnrouted":0,"sessionDurations":{"mean":0,"min":0,"max":0},"runtimeStats":{"currentHeapSize":2030,"gcCpuTime":530509375730,"cpuTime":7240927788803,"maxHeapSize":12419},"totalMessages":6653467}}}},"version":"v4.2.1"}
cardano-graphql-cardano-node-ogmios-1       | [cc159471:cardano.node.ChainDB:Notice:148] [2021-12-20 13:12:16.22 UTC] Chain extended, new tip: d46efb0f6f935b0184016da138309f5bcfa485204d2ff191106f38a7770b19a8 at slot 48439645
cardano-graphql-postgres-1                  | 2021-12-20 12:35:51.851 UTC [23621] ERROR:  value too long for type character varying(65536)
cardano-graphql-postgres-1                  | 2021-12-20 12:35:51.851 UTC [23621] STATEMENT:  WITH "Asset__mutation_result_alias" AS (UPDATE "public"."Asset" SET "decimals" = NULL,"description" = ($1)::text,"logo" = ($2)::text,"metadataHash" = ($3)::bpchar,"name" = ($4)::text,"ticker" = ($5)::text,"url" = NULL  WHERE (('true') AND ((((("public"."Asset"."assetId") = (($6)::bytea)) AND ('true')) AND ('true')) AND ('true'))) RETURNING * , CASE WHEN 'true' THEN NULL ELSE "hdb_catalog"."check_violation"('update check constraint failed')  END ), "Asset__all_columns_alias" AS (SELECT  "assetId" , "assetName" , "decimals" , "description" , "fingerprint" , "firstAppearedInSlot" , "logo" , "metadataHash" , "name" , "policyId" , "ticker" , "url"  FROM "Asset__mutation_result_alias"      ) SELECT  json_build_object('affected_rows', (SELECT  COUNT(*)  FROM "Asset__all_columns_alias"      ), 'returning', (SELECT  coalesce(json_agg("root" ), '[]' ) AS "root" FROM  (SELECT  row_to_json((SELECT  "_1_e"  FROM  (SELECT  "_0_root.base"."assetId" AS "assetId"       ) AS "_1_e"      ) ) AS "root" FROM  (SELECT  *  FROM "Asset__all_columns_alias" WHERE ('true')     ) AS "_0_root.base"      ) AS "_2_root"      ) )
cardano-graphql-postgres-1                  | 2021-12-20 12:36:58.695 UTC [23649] ERROR:  value too long for type character varying(65536)
cardano-graphql-postgres-1                  | 2021-12-20 12:36:58.695 UTC [23649] STATEMENT:  WITH "Asset__mutation_result_alias" AS (UPDATE "public"."Asset" SET "decimals" = ($1)::integer,"description" = ($2)::text,"logo" = ($3)::text,"metadataHash" = ($4)::bpchar,"name" = ($5)::text,"ticker" = ($6)::text,"url" = ($7)::text  WHERE (('true') AND ((((("public"."Asset"."assetId") = (($8)::bytea)) AND ('true')) AND ('true')) AND ('true'))) RETURNING * , CASE WHEN 'true' THEN NULL ELSE "hdb_catalog"."check_violation"('update check constraint failed')  END ), "Asset__all_columns_alias" AS (SELECT  "assetId" , "assetName" , "decimals" , "description" , "fingerprint" , "firstAppearedInSlot" , "logo" , "metadataHash" , "name" , "policyId" , "ticker" , "url"  FROM "Asset__mutation_result_alias"      ) SELECT  json_build_object('affected_rows', (SELECT  COUNT(*)  FROM "Asset__all_columns_alias"      ), 'returning', (SELECT  coalesce(json_agg("root" ), '[]' ) AS "root" FROM  (SELECT  row_to_json((SELECT  "_1_e"  FROM  (SELECT  "_0_root.base"."assetId" AS "assetId"       ) AS "_1_e"      ) ) AS "root" FROM  (SELECT  *  FROM "Asset__all_columns_alias" WHERE ('true')     ) AS "_0_root.base"      ) AS "_2_root"      ) )
cardano-graphql-postgres-1                  | 2021-12-20 12:51:05.988 UTC [23702] ERROR:  value too long for type character varying(65536)
cardano-graphql-postgres-1                  | 2021-12-20 12:51:05.988 UTC [23702] STATEMENT:  WITH "Asset__mutation_result_alias" AS (UPDATE "public"."Asset" SET "decimals" = NULL,"description" = ($1)::text,"logo" = ($2)::text,"metadataHash" = ($3)::bpchar,"name" = ($4)::text,"ticker" = ($5)::text,"url" = ($6)::text  WHERE (('true') AND ((((("public"."Asset"."assetId") = (($7)::bytea)) AND ('true')) AND ('true')) AND ('true'))) RETURNING * , CASE WHEN 'true' THEN NULL ELSE "hdb_catalog"."check_violation"('update check constraint failed')  END ), "Asset__all_columns_alias" AS (SELECT  "assetId" , "assetName" , "decimals" , "description" , "fingerprint" , "firstAppearedInSlot" , "logo" , "metadataHash" , "name" , "policyId" , "ticker" , "url"  FROM "Asset__mutation_result_alias"      ) SELECT  json_build_object('affected_rows', (SELECT  COUNT(*)  FROM "Asset__all_columns_alias"      ), 'returning', (SELECT  coalesce(json_agg("root" ), '[]' ) AS "root" FROM  (SELECT  row_to_json((SELECT  "_1_e"  FROM  (SELECT  "_0_root.base"."assetId" AS "assetId"       ) AS "_1_e"      ) ) AS "root" FROM  (SELECT  *  FROM "Asset__all_columns_alias" WHERE ('true')     ) AS "_0_root.base"      ) AS "_2_root"      ) )
cardano-graphql-postgres-1                  | 2021-12-20 12:53:40.588 UTC [23736] ERROR:  value too long for type character varying(65536)
cardano-graphql-postgres-1                  | 2021-12-20 12:53:40.588 UTC [23736] STATEMENT:  WITH "Asset__mutation_result_alias" AS (UPDATE "public"."Asset" SET "decimals" = ($1)::integer,"description" = ($2)::text,"logo" = ($3)::text,"metadataHash" = ($4)::bpchar,"name" = ($5)::text,"ticker" = ($6)::text,"url" = ($7)::text  WHERE (('true') AND ((((("public"."Asset"."assetId") = (($8)::bytea)) AND ('true')) AND ('true')) AND ('true'))) RETURNING * , CASE WHEN 'true' THEN NULL ELSE "hdb_catalog"."check_violation"('update check constraint failed')  END ), "Asset__all_columns_alias" AS (SELECT  "assetId" , "assetName" , "decimals" , "description" , "fingerprint" , "firstAppearedInSlot" , "logo" , "metadataHash" , "name" , "policyId" , "ticker" , "url"  FROM "Asset__mutation_result_alias"      ) SELECT  json_build_object('affected_rows', (SELECT  COUNT(*)  FROM "Asset__all_columns_alias"      ), 'returning', (SELECT  coalesce(json_agg("root" ), '[]' ) AS "root" FROM  (SELECT  row_to_json((SELECT  "_1_e"  FROM  (SELECT  "_0_root.base"."assetId" AS "assetId"       ) AS "_1_e"      ) ) AS "root" FROM  (SELECT  *  FROM "Asset__all_columns_alias" WHERE ('true')     ) AS "_0_root.base"      ) AS "_2_root"      ) )
cardano-graphql-postgres-1                  | 2021-12-20 12:54:52.936 UTC [23736] ERROR:  value too long for type character varying(65536)
cardano-graphql-postgres-1                  | 2021-12-20 12:54:52.936 UTC [23736] STATEMENT:  WITH "Asset__mutation_result_alias" AS (UPDATE "public"."Asset" SET "decimals" = NULL,"description" = ($1)::text,"logo" = ($2)::text,"metadataHash" = ($3)::bpchar,"name" = ($4)::text,"ticker" = ($5)::text,"url" = NULL  WHERE (('true') AND ((((("public"."Asset"."assetId") = (($6)::bytea)) AND ('true')) AND ('true')) AND ('true'))) RETURNING * , CASE WHEN 'true' THEN NULL ELSE "hdb_catalog"."check_violation"('update check constraint failed')  END ), "Asset__all_columns_alias" AS (SELECT  "assetId" , "assetName" , "decimals" , "description" , "fingerprint" , "firstAppearedInSlot" , "logo" , "metadataHash" , "name" , "policyId" , "ticker" , "url"  FROM "Asset__mutation_result_alias"      ) SELECT  json_build_object('affected_rows', (SELECT  COUNT(*)  FROM "Asset__all_columns_alias"      ), 'returning', (SELECT  coalesce(json_agg("root" ), '[]' ) AS "root" FROM  (SELECT  row_to_json((SELECT  "_1_e"  FROM  (SELECT  "_0_root.base"."assetId" AS "assetId"       ) AS "_1_e"      ) ) AS "root" FROM  (SELECT  *  FROM "Asset__all_columns_alias" WHERE ('true')     ) AS "_0_root.base"      ) AS "_2_root"      ) )
cardano-graphql-cardano-node-ogmios-1       | [cc159471:cardano.node.ChainDB:Notice:148] [2021-12-20 13:12:44.82 UTC] Chain extended, new tip: b8ce0cde7477d14aef3e529d727a41edbda65c2b6bf93a962bbdb08bcb896497 at slot 48439673
cardano-graphql-cardano-node-ogmios-1       | {"severity":"Info","timestamp":"2021-12-20T13:12:44.835403769Z","thread":"39","message":{"tag":"OgmiosHealth","healthCheck":{"tag":"HealthTick","status":{"startTime":"2021-12-17T12:02:44.809469603Z","lastKnownTip":{"slot":48439673,"hash":"b8ce0cde7477d14aef3e529d727a41edbda65c2b6bf93a962bbdb08bcb896497","blockNo":6651750},"lastTipUpdate":"2021-12-20T13:12:44.835206338Z","networkSynchronization":0.99999,"currentEra":"Alonzo","metrics":{"activeConnections":3,"totalConnections":3,"totalUnrouted":0,"sessionDurations":{"mean":0,"min":0,"max":0},"runtimeStats":{"currentHeapSize":2034,"gcCpuTime":530562542861,"cpuTime":7241007215909,"maxHeapSize":12419},"totalMessages":6653468}}}},"version":"v4.2.1"}
cardano-graphql-cardano-node-ogmios-1       | [cc159471:cardano.node.ChainDB:Notice:148] [2021-12-20 13:12:49.28 UTC] Chain extended, new tip: f8d9e3a4dfa3abda23044fac82c3d90054abf3c5cfa6ec4f74acac874d1d525d at slot 48439678
cardano-graphql-cardano-node-ogmios-1       | {"severity":"Info","timestamp":"2021-12-20T13:12:49.305811543Z","thread":"39","message":{"tag":"OgmiosHealth","healthCheck":{"tag":"HealthTick","status":{"startTime":"2021-12-17T12:02:44.809469603Z","lastKnownTip":{"slot":48439678,"hash":"f8d9e3a4dfa3abda23044fac82c3d90054abf3c5cfa6ec4f74acac874d1d525d","blockNo":6651751},"lastTipUpdate":"2021-12-20T13:12:49.305580363Z","networkSynchronization":1.00000,"currentEra":"Alonzo","metrics":{"activeConnections":3,"totalConnections":3,"totalUnrouted":0,"sessionDurations":{"mean":0,"min":0,"max":0},"runtimeStats":{"currentHeapSize":2037,"gcCpuTime":530587742969,"cpuTime":7241040668058,"maxHeapSize":12419},"totalMessages":6653469}}}},"version":"v4.2.1"}

What is the expected behavior?

cardano-graphql should answer correctly on graphql port 3100 and return a correct json string.

CyberCyclone commented 2 years ago

After a full sync you'll need to bring down the Docker stack and bring it back up again (removing the DB restore field).

pyromaniac3010 commented 2 years ago

Ok, so I executed

docker-compose down
docker-compuse up -d

Now the graphgl-port does respond (after about 30 minute wait), but the database is now reverted to the last database block and is many hours back again. So I have some questions / suggestions for improvement:

There should be a hint in the README or Wiki to tell everyone that you NEED to execute "docker-compose down && docker-compuse up -d", if you follow the suggested install path

Why do we have to restart the whole stack? It would be great if a "docker-compose restart cardano-graphql" would work, but it did not. This should prevent the rollback of the cardano-node / postgres db states. There are no listed dependencys in the docker-compose.yml which indicate that other services depend on this service or that cardano-graphql depends on other services.

Update System Requirements The system Requirements in https://github.com/input-output-hk/cardano-graphql/releases/tag/6.1.0 are outdated. There should be some information in the Readme / Wiki telling that you need REALLY FAST disks with LOTS of IOPS. Otherwise everything takes hours or days to startup / restart. And 80GB of diskspace is far from enough. The created docker-volumes for a current up to date setup are way bigger:

110G    ./cardano-graphql_postgres-data
23G     ./cardano-graphql_node-db
0       ./cardano-graphql_node-ipc
5.0G    ./cardano-graphql_db-sync-data

Plus you need about 40GB - 50GB extra to restore the database snapshot. So you need at least 200GB hard disk space for the complete cardano-graphql docker stack.