π Troubleshooting
Once your processor is deployed, occasional troubleshooting are essential to ensure it runs correctly and efficiently.
Troubleshooting Common Errors
Processors can stop due to various errors. Refer to this list for common causes and solutions:
-
Quota Exceeded:
- Symptom: Processor stops with a "Quota exceeded" message.
- Cause: Exceeded resource limits of your Sentio plan.
- Solution: Upgrade plan or optimize processor (see
Performance Tuning
below and Cost Reduction best practice).
-
Time Series Exceeds Limit (High Cardinality):
- Symptom: Error related to too many time series (~10k limit per metric).
- Cause: Using high-cardinality labels (addresses, hashes) in metrics.
- Solution: Use Event Logs or Entities for high-cardinality data. (See Avoiding High Cardinality).
-
Invalid Label/Metric Name:
- Symptom: Error about invalid names.
- Cause: Using invalid characters or reserved names.
- Solution: Rename according to rules (letters, numbers,
_
) and avoid reserved keywords. Re-upload.
-
Runtime Errors in Handler Code:
- Symptom: Generic error, potentially pointing to a code line.
- Cause: Bugs in TypeScript (null access, type errors, etc.).
- Solution: Debug using logs (
console.log
,ctx.eventLogger
), test locally, wrap code intry...catch
, log detailed error info.
-
RPC/Node Errors (e.g., Ethers Errors):
- Symptom: Failed contract view calls (
ctx.contract.*
). - Cause: Wrong address/network, invalid block number for call, node issues, incorrect ABI/args.
- Solution: Verify address/network, log context (
ctx.blockNumber
,ctx.network
), usetry...catch
, check ABI, contact support if node issues suspected.
- Symptom: Failed contract view calls (
Troubleshooting Performance Issues
If your processor backfill is too slow or queries are lagging:
-
Slow Query Speed:
- Cause: Too many metric data points being queried.
- Solution:
- Use Metric Resolution (pre-aggregation) for Gauges in processor code (
aggregationConfig
). - Optimize dashboard query time ranges and UI aggregations.
- Emit metrics less frequently if feasible.
- Use Metric Resolution (pre-aggregation) for Gauges in processor code (
-
Slow Processor Backfill:
- Cause: Excessive RPC calls, complex logic, high interval frequency, processing full history.
- Solution:
- Minimize RPC Calls: Prioritize data from event/call arguments.
- Optimize Logic: Use profiling (see below).
- Adjust Backfill Intervals: Use larger
backfillInterval
foronBlockInterval
/onTimeInterval
. - Use
startBlock
: Limit historical processing. - Use Event Filters: Reduce unnecessary handler executions.
-
Profiling (Performance Bottlenecks):
- Tool: Use the Profile feature in the Data Source -> System Monitor section of the Sentio UI.
- Process:
- Start recording for a chosen duration.
- Download the generated profile file (
.cpuprofile
). - Load the file into a flame graph tool (e.g., Chrome DevTools -> Performance -> Load profile...).
- Analyze the chart (especially the "Bottom-Up" view) to identify functions consuming the most CPU time. These are your primary targets for optimization.
Updated about 15 hours ago