[Bug] Subgraph doesn't sync after node restart
Bug report
I ran the Graph-Node Docker version locally on my server and deployed the Ethereum subgraph. It works and syncs well. But when I stop the Graph-Node with the docker compose down command and run it again with the docker compose up command, the Graph-Node doesn't continue syncing until I deploy the subgraph again. I've tried it with different RPCs and chains, but I encountered the same problem with all of them. Does anyone have any idea why this happens? Is it normal, or is it a Graph-Node bug?
Edit: I tried to resume the subgraph deployment to fix this problem with the following command:
graphman resume QmUc824r...
and I got:
resuming QmUc824r... Operation completed
But Nothing happened and the problem remained. Also, I tried to reassign the deployment using the following command:
graphman reassign QmUc824r... default
and I got:
deployment QmUc824r... is already assigned to default warning: this is the only deployment assigned to default are you sure it is spelled correctly?
Again nothing happened and the problem remained.
Edit: Today I noticed that when I ran a graph node for the first time, I saw the line in the logs that has something like this:
Started all assigned subgraphs.
But after restarting it again as I mentioned above, I can't find anything like this in the logs.
Relevant log output
No response
IPFS hash
No response
Subgraph name or link to explorer
No response
Some information to help us out
- [ ] Tick this box if this bug is caused by a regression found in the latest release.
- [ ] Tick this box if this bug is specific to the hosted service.
- [X] I have searched the issue tracker to make sure this issue is not a duplicate.
OS information
Linux
Hi @mehditvk8 that doesn't sound normal, can you share any logs from the Graph Node? What version are you running?
@azf20 As I see while inspecting the docker image, It is the latest version.
"Id": "sha256:8aa859b2b214d8059d09f971c2b808b76e2fe854946511186e8780c8be884a43", "RepoTags": [ "graphprotocol/graph-node:latest" ], "RepoDigests": [ "graphprotocol/graph-node@sha256:787665b2e82c915e407f9eb14ea59c78d840d05bf186a20d6e32a8a4b0b7a8c5" ],
Also, The version of Graphman is 0.32.0 (2023-08-21).
Before I make down the docker-compose, I can see the old blocks are syncing and I can see some logs like these:
subgraph-docker-graph-node-1 | Oct 17 09:27:58.029 INFO Scanning blocks [6145095, 6145472], range_size: 378, sgd: 1, subgraph_id: QmeZJwXBbMzxn9EecUzZfYpYAVqd8v4YozCwdXXzc1pTEq, component: BlockStream
subgraph-docker-graph-node-1 | Oct 16 15:35:59.671 INFO Done processing trigger, gas_used: 115773562, data_source: Contract, handler: handleApproval, total_ms: 1, transaction: 0x5b4d…425c, address: 0x1e4a…d41d, signature: Approval(indexed address,indexed address,uint256), sgd: 1, subgraph_id: QmeZJwXBbMzxn9EecUzZfYpYAVqd8v4YozCwdXXzc1pTEq, component: SubgraphInstanceManager
subgraph-docker-graph-node-1 | Oct 16 15:35:59.672 INFO Done processing trigger, gas_used: 115587310, data_source: Contract, handler: handleTransfer, total_ms: 1, transaction: 0x5b4d…425c, address: 0x1e4a…d41d, signature: Transfer(indexed address,indexed address,uint256), sgd: 1, subgraph_id: QmeZJwXBbMzxn9EecUzZfYpYAVqd8v4YozCwdXXzc1pTEq, component: SubgraphInstanceManager
subgraph-docker-graph-node-1 | Oct 16 15:35:59.672 INFO Applying 3 entity operation(s), block_hash: 0xc93887e94a726023f93e8f92721137556ceeb3248f49cd04aa07d6a0e3fb1607, block_number: 6322141, sgd: 1, subgraph_id: QmeZJwXBbMzxn9EecUzZfYpYAVqd8v4YozCwdXXzc1pTEq, component: SubgraphInstanceManager
Also, When I continuously watch the graphmnan info -s output I can see both latest block and chain head blocks are increasing over time.
But after I start the docker compose again I cannot see the above logs again. The only thing I can see are these logs:
subgraph-docker-graph-node-1 | Oct 17 08:27:39.972 INFO Syncing 2 blocks from Ethereum, code: BlockIngestionStatus, blocks_needed: 2, blocks_behind: 2, latest_block_head: 6338690, current_block_head: 6338688, provider: polygon-zkevm2, component: EthereumPollingBlockIngestor
Also, When I continuously watch the graphmnan info -s output again, the latest block does not increase anymore. Just the chain head blocks field is increasing over time.
And there is no errors for that subgraph? Do you see a log like "Starting or restarting subgraph" after the docker restart?
No. There is no error. I didn't see logs like that. @incrypto32
The graph node stop working after restart the docker
Looks like this issue has been open for 6 months with no activity. Is it still relevant? If not, please remember to close it.