How to handle "Query Timeout" error?
"Query Timeout" is a common issue that you will run into when creating or viewing charts. It typically means that the data which you are asking Scout to process is taking too long to process.
If it happens in the Chart Creator, the easiest fix is to narrow down your search conditions in the Filter step. Here are couple common techniques:
1.If the data source that you are working with has a timestamp type field (such as blockTimestamp field in Transactions) , try to limit it with a recent date range such as:
Add a "blockTimestamp" condition in the Filter
This does not affect your final chart unless you turn off the "Respond to the date filter" option.
2. If you are searching a specific log, try to use the logs.address field to narrow down the search range whenever possible. There are many smart contracts on Ethereum share the exact same log name, parameters (and methodId). Putting a limit with logs.address can improve the speed and capacity of your pipeline.
The below example searches transactions with a log called Mint (minter, mintAmount, mintTokens). And it only searches the logs from 3 Compound cTokens since all cTokens share the same Mint log.
the cTokens on Compound share the exact same "Mint" log
There is a limit on how much you can improve your pipeline in order to avoid "Query Timeout". If you have tried above techniques and are still encountering the issue, it's time to ping us at [email protected] The next step for us is to build a customized data source to further reduce any data transformation that's required for your chart.
Last modified 1yr ago
Copy link