Skip to content

Restarting Document Cache Process

Nikolaus Heger edited this page Jun 4, 2024 · 7 revisions

How to restart the GraphQL Document Cache Processor

1 Ensure that processor has actually stuck

Under the DGraph cloud ( https://cloud.dgraph.io/_/explorer ) choose the right namespace and query the cursor.

query Cursors { queryCursor(first: 10, offset: 0) { id cursor }

This query should return similar response: image

Based on this response, current cursor is at block 36215565

Compare this block with number of current block ( on blockchain explorer ). If they differ much and this cursor is not updating, it means that GraphQL sync has been blocked

2 Checking logs and restarting service

Login to AWS and find the running document cache processor instances ( https://us-east-1.console.aws.amazon.com/ec2/home?region=us-east-1#Instances:instanceState=running )

Connect to the console of instance for particular chain and environment

Run the following command to get the latest logs

systemctl status hypha-doccache-processor.service
journalctl -u hypha-doccache-processor.service -n 100 -f

Try to run the service again with

systemctl start hypha-doccache-processor.service

3 Updating the block number ( if needed )

Manually start the process by going to the folder on AWS instance

cd /home/ec2-user/app 

and running the command

./hypha-doccache-processor ./config.yml [BLOCK_NUMBER]

Running manually the process would also show you the error, so you could debug it that way

4 Deploying a new version

Replace the file hypha-doccache-processor on ~/app with a new file using scp