gobitfly/eth2-beaconchain-explorer

error calling getExecutionChartData: context deadline exceeded

Closed this issue · 5 comments

Many Bigtable queries in the query logic will time out. How to solve this situation?

ctx, cancel := context.WithDeadline(context.Background(), time.Now().Add(time.Second*30))

func (bigtable *Bigtable) GetBlocksIndexedMultiple(blockNumbers []uint64, limit uint64) ([]*types.Eth1BlockIndexed, error) {
	rowList := gcp_bigtable.RowList{}
	for _, block := range blockNumbers {
		rowList = append(rowList, fmt.Sprintf("%s:B:%s", bigtable.chainId, reversedPaddedBlockNumber(block)))
	}

	ctx, cancel := context.WithDeadline(context.Background(), time.Now().Add(time.Second*30)) // Even if I change to 60 seconds, it will time out
	defer cancel()

how to solve this problem?

Buttaa commented

Hey @cppfuns ,

Thanks for raising the issue. Unfortunately, we don't provide technical support for the project. If your project aligns with the Ethereum ethos and you're interested in an EaaS (Explorer as a Service), feel free to reach out to us on Discord.

Hey @cppfuns ,

Thanks for raising the issue. Unfortunately, we don't provide technical support for the project. If your project aligns with the Ethereum ethos and you're interested in an EaaS (Explorer as a Service), feel free to reach out to us on Discord.

For the problems encountered by users, is it conducive to improving the project? If it's because you don't have time to answer, or for some reason, is it okay to leave this feedback open? For others who have encountered similar problems, or are willing to answer, to answer?

@recy21 Do you have a different opinion?

recy21 commented

@cppfuns I have the current version up and running and all queries are running fine. There are sometimes (about twice a day) some timeouts, I already contacted Google (I host my bigtable directly there) about it, it seems they can't explain the spikes either, but we are investigating the problem and may post it here if we find a solution.

Your problem on the other hand does not sound similar to mine. It looks more like your bigtables have a fundamental problem, because if I understand you correctly, they are "always" interrupted? There could be several reasons for this: Too few resources, too many queries at the same time, some other random thing with your setup (I can't think of anything).

Unfortunately Butta is right, we don't offer technical support (currently), and I can only help you with this information: "It works on at least 3 other installations, without your problem, so the problem is not in the code, but in your setup" + "Try to trace / debug the queries separate one by one, which might give a hint on the issue"

I'm sorry that I can't help you any further.

@Buttaa @recy21 Thank you both, I wish you all the best