Installation Issues
Poetry Installation Fails
Python Version Mismatch
Python Version Mismatch
Problem: Error about Python version compatibilitySolution: Verify you’re using Python 3.10 or later:If needed, install Python 3.10+:Then ensure Poetry uses the correct version:
Dependency Resolution Errors
Dependency Resolution Errors
Problem: Poetry takes too long or fails to resolve dependenciesSolution: Try these steps:
pip Installation Issues
Permission Denied
Permission Denied
Problem: Can’t write to system Python directoriesSolution: Use a virtual environment or user install:
Startup Issues
Target Endpoint Required
Missing --target Flag
Missing --target Flag
Problem:Solution: Always specify a target endpoint:The target is required because Chainbench needs to:
- Fetch real blockchain data for test parameters
- Initialize the appropriate test data structures
- Validate the endpoint is accessible
Profile Not Found
Invalid Profile Name
Invalid Profile Name
Problem:Solution: List available profiles and use the exact name:
Multiple Test Data Types Detected
Mixed Profile Directory
Mixed Profile Directory
Problem:Solution: This happens when running a profile directory (without
--profile) that contains both EVM and Solana profiles. Either:-
Specify a profile explicitly:
-
Use a specific subdirectory:
-
Use —profile-path for a single file:
Test Data Issues
Insufficient Block History
Node History Too Short
Node History Too Short
Problem: Node runs in a pruned or snap-sync mode with limited historySymptoms:This:
- Errors about missing blocks
- “block not found” messages in logs
- High failure rates for historical data queries
--use-latest-blocks flag:- Uses only recent blocks (last 100 for size S)
- Continuously updates test data with new blocks
- Avoids queries to pruned history
Custom Block Range Errors
Custom Block Range Errors
Problem:orSolution: Provide both flags with valid values:
The
--use-latest-blocks flag overrides custom block ranges. Don’t use both together.Slow Test Data Generation
Large Data Size
Large Data Size
Problem: Test data generation takes too longSolution: Start with smaller sizes and scale up:Data generation time scales with:
- Block count (size)
- Number of transactions per block
- Network latency to the node
- Complexity of the profile
Slow Reference Node
Slow Reference Node
Problem: Test data generation is slow because the target node is slowSolution: Use a fast reference node for data generation:The
--ref-url node is used only for fetching test data. The benchmark runs against --target.Connection Issues
Timeout Errors
HTTP Timeouts During Tests
HTTP Timeouts During Tests
Problem: High rate of timeout errors in resultsSymptoms:Causes:
- Node is overloaded
- Network latency is too high
- Request rate is too aggressive
-
Reduce load:
-
Increase workers for better distribution:
-
Use a lighter profile:
Connection Refused
Connection Refused
Problem: Can’t connect to the target endpointSolution: Verify endpoint accessibility:Common issues:
- Firewall blocking requests
- API key required but not provided
- Endpoint URL has typo
- HTTPS certificate issues
Rate Limiting
429 Too Many Requests
429 Too Many Requests
Problem: Endpoint returns rate limit errorsSymptoms:
- HTTP 429 status codes
- “Rate limit exceeded” messages
- Sudden drop in successful requests
-
Reduce request rate:
-
Use step load shape for gradual increase:
-
For method discovery, the tool auto-retries with exponential backoff:
Worker and Process Issues
Worker Startup Failures
Workers Not Starting
Workers Not Starting
Problem: Workers fail to connect to masterSymptoms:
- Only master process starts
- No actual load on target
- “Waiting for workers” message persists
Port Already in Use
Port Already in Use
Problem: Master port 5557 is already boundSolution: Change the port or stop conflicting process:
Headless Mode Issues
Test Doesn't Auto-Quit
Test Doesn't Auto-Quit
Problem: Test keeps running after completion in headless modeSolution: Use the Without
--autoquit flag:--autoquit:- Master process stays running
- Web UI remains accessible at localhost:8089
- You must manually stop with Ctrl+C
--autoquit:- All processes terminate after test duration
- Results are saved before exit
- Suitable for automation and CI/CD
Monitor Issues
Monitors Not Starting
Monitors Not Starting
Problem: Monitors like sync-lag-monitor don’t runRequirements:
- Monitors only work in headless mode
- Requires valid target endpoint
Database Integration Issues
TimescaleDB Connection Failures
Missing Database Parameters
Missing Database Parameters
Problem:Solution: Provide all required parameters:
Can't Connect to Database
Can't Connect to Database
Problem: Chainbench can’t reach PostgreSQL/TimescaleDBTroubleshooting steps:
Performance Issues
High CPU Usage
System Overload
System Overload
Problem: Chainbench consumes excessive CPUCauses:
- Too many workers for available cores
- Very high request rate
- Complex profile with heavy processing
-
Match workers to CPU cores:
-
Reduce user count:
-
Use simpler profile:
High Memory Usage
Memory Exhaustion
Memory Exhaustion
Problem: Chainbench uses too much RAMCauses:
- Large test data size
- Many workers
- Long-running test accumulating data
-
Use smaller data size:
-
Reduce worker count:
-
Use —use-latest-blocks to avoid loading historical data:
Results and Output Issues
Results Directory Permissions
Results Directory Permissions
Problem: Can’t write results to directorySolution: Ensure write permissions:
Missing Results Files
Missing Results Files
Problem: Expected CSV/JSON files not createdCauses:Results are saved to:
- Test didn’t run (workers failed to start)
- Test was interrupted (Ctrl+C before completion)
- Insufficient disk space
Batch Mode Issues
Batch Requests Failing
Batch Requests Failing
Problem: Errors when using
--batch flagSymptoms:- Higher error rates with batch mode
- “Invalid batch request” errors
- Some methods work, others don’t
- Not all RPC endpoints support batch requests
- Batch size too large for endpoint
-
Reduce batch size:
-
Test without batch first:
-
Check endpoint batch support:
Debug and Trace Methods
Debug Methods Excluded
Debug Methods Excluded
Problem: Debug/trace methods not running even though they’re in the profileExplanation: By default, methods tagged with
debug or trace are excludedSolution: Use the --debug-trace-methods flag:Notification Issues
Not Receiving Notifications
Not Receiving Notifications
Problem: No notifications appear despite using
--notifyTroubleshooting:-
Verify topic name matches:
-
Test manually:
-
Check headless mode:
- “Test started” notifications only appear in headless mode
- “Test finished” notifications always appear
-
Verify network access:
Code Quality Issues
Pre-commit Hook Failures
Pre-commit Hook Failures
Problem: Commit fails with formatting errorsSolution: Run formatting and checks before committing:
Getting Additional Help
Enable Verbose Logging
DEBUG, INFO (default), WARNING, ERROR
Check Locust Logs
Results directory contains detailed logs:Useful Diagnostic Commands
Report Issues
If you encounter a bug or need help:- GitHub Issues: chainstacklabs/chainbench/issues
- Provide:
- Chainbench version (
chainbench --version) - Full command used
- Error messages and logs
- Python version (
python --version) - Operating system
- Chainbench version (
Community Resources
- Documentation: Review profile creation guide (docs/PROFILE.md)
- Examples: Check built-in profiles in
chainbench/profile/ - Contributing: See CONTRIBUTING.md for development guidelines