Troubleshooting Guide
This guide helps diagnose and resolve common issues when running BenchBox benchmarks.
Quick Diagnosis
Error Type Matrix
| Error Message Contains | Likely Cause | Jump To |
|---|---|---|
| “connection refused” | Platform not running | Connection Issues |
| “authentication failed” | Invalid credentials | Authentication |
| “catalog not found” | Presto/Trino config | Catalog Errors |
| “permission denied” | Access rights | Permission Errors |
| “timeout” | Slow query/network | Timeouts |
| “out of memory” | Scale too large | Memory Issues |
| “ImportError” | Missing package | Dependencies |
| “file not found” | Data loading | Data Loading |
| “command not found: benchbox” | PATH issue | Installation Issues |
Installation Issues
command not found: benchbox
Problem: The benchbox command is not available in your shell after installation.
Solution:
-
Check your PATH: Ensure that the Python scripts directory is in your system’s
PATH. You can find the directory by running:Terminal window python -m site --user-baseAdd the
binsubdirectory of that path to yourPATH. -
Reactivate your virtual environment: If you installed BenchBox in a virtual environment, make sure it’s activated:
Terminal window source .venv/bin/activate
Missing Platform Dependencies
Problem: You get an ImportError when trying to use a specific database platform.
Solution:
Install the required dependencies for that platform:
pip install "benchbox[snowflake]"pip install "benchbox[databricks]"pip install "benchbox[bigquery]"
pip install "benchbox[cloud]"
pip install "benchbox[dataframe-all]"Check installation status:
benchbox platforms listShell Reports no matches found
Problem: Shells such as zsh treat square brackets as glob patterns, producing errors like zsh: no matches found: benchbox[cloud].
Solution: Use modern uv syntax (no quotes needed):
uv add benchbox --extra clouduv add benchbox --extra cloud --extra clickhouseOr quote the pip-compatible syntax:
uv pip install "benchbox[cloud]"python -m pip install "benchbox[cloud,clickhouse]"Connection Issues
Connection Refused
Symptoms:
ConnectionRefusedError: [Errno 111] Connection refusedOperationalError: could not connect to serverDiagnosis:
curl -s http://localhost:3473/healthcurl -s http://localhost:8080
docker ps | grep -E 'trino|presto|clickhouse|firebolt'The first curl checks Firebolt Core on port 3473. The second checks Trino or Presto on port 8080. The docker ps command lists the Docker-based platforms that are running.
Solutions:
-
Start the platform:
Terminal window docker run -d -p 8080:8080 trinodb/trinodocker run -d -p 3473:3473 ghcr.io/firebolt-db/firebolt-core:preview-rcdocker run -d -p 9000:9000 clickhouse/clickhouse-server -
Check port availability:
Terminal window lsof -i :8080netstat -an | grep 8080The
lsofcommand shows whether the port is already in use. -
Verify host/port in config: Trino and Presto do not accept
hostorportas--platform-optionkeys. BenchBox reads them from the platform’s section of~/.benchbox/credentials.yaml, and defaults tolocalhost:8080:trino:host: localhostport: 8080
Network Timeout
Symptoms:
TimeoutError: Connection timed outsocket.timeout: timed outSolutions:
- Cloud platforms - check firewall:
Terminal window aws ec2 describe-security-groups --group-ids sg-xxxnc -zv your-cluster.redshift.amazonaws.com 5439
Authentication Failures
Invalid Credentials
Symptoms:
AuthenticationError: Invalid credentials401 UnauthorizedAccess DeniedPlatform-Specific Solutions:
Snowflake
snowsql -a $SNOWFLAKE_ACCOUNT -u $SNOWFLAKE_USER
echo $SNOWFLAKE_ACCOUNTThe account should use the account_locator.region format. Correct values look like xy12345.us-east-1 or xy12345.us-east-1.aws.
Databricks
curl -H "Authorization: Bearer $DATABRICKS_TOKEN" \ https://your-workspace.cloud.databricks.com/api/2.0/clusters/listThis call tests that the token is valid. If the token has expired (the default lifetime is 90 days), regenerate it under User Settings > Developer > Access Tokens.
BigQuery
gcloud auth activate-service-account --key-file=$GOOGLE_APPLICATION_CREDENTIALSgcloud auth application-default print-access-token
gcloud projects describe $BIGQUERY_PROJECTRedshift
psql -h $REDSHIFT_HOST -p 5439 -U $REDSHIFT_USER -d dev
aws sts get-caller-identityThe aws sts get-caller-identity command verifies the role when you use IAM authentication.
Token Expired
Symptoms:
Token has expiredSession expiredSolutions:
-
Regenerate tokens:
- Databricks: User Settings > Access Tokens > Generate New
- Snowflake: Tokens don’t expire, check password
- BigQuery:
gcloud auth application-default login
-
Use refresh tokens where supported:
Terminal window gcloud auth application-default login
Catalog Not Found (Presto/Trino)
Symptoms:
ConfigurationError: Catalog 'memory' not foundCatalogNotFoundError: Catalog does not existCause: The memory catalog default rarely exists on production servers.
Solutions:
-
List available catalogs:
Terminal window benchbox platforms check trino -
Specify the correct catalog:
Terminal window benchbox run --platform trino --benchmark tpch \--platform-option catalog=hiveReplace
hivewithiceberg,delta, or another catalog name as needed. -
Common catalog names:
hive- Hive Metastoreiceberg- Apache Icebergdelta- Delta Laketpch- TPC-H connector (built-in)mysql,postgresql- Database connectors
Permission Errors
Insufficient Privileges
Symptoms:
PermissionDenied: User does not have permissionAccessDenied: Access DeniedSolutions by Platform:
Snowflake
GRANT USAGE ON WAREHOUSE compute_wh TO ROLE benchbox_role;GRANT CREATE DATABASE ON ACCOUNT TO ROLE benchbox_role;GRANT USAGE ON DATABASE benchbox TO ROLE benchbox_role;GRANT CREATE TABLE ON SCHEMA benchbox.public TO ROLE benchbox_role;Databricks
GRANT USE CATALOG ON CATALOG benchmarks TO `user@company.com`;GRANT CREATE SCHEMA ON CATALOG benchmarks TO `user@company.com`;GRANT USE SCHEMA ON SCHEMA benchmarks.default TO `user@company.com`;BigQuery
gcloud projects add-iam-policy-binding $PROJECT_ID \ --member="user:user@company.com" \ --role="roles/bigquery.dataEditor"Redshift
GRANT CREATE ON DATABASE dev TO benchbox_user;GRANT ALL ON SCHEMA public TO benchbox_user;Query Timeouts
Symptoms:
QueryTimeoutError: Query exceeded time limitStatement timeoutSolutions:
-
Increase query timeout:
- Snowflake: BenchBox sets
STATEMENT_TIMEOUT_IN_SECONDS = 1800for OLAP benchmarks such as TPC-H and TPC-DS, and has no setting to change it. - Redshift:
statement_timeout(milliseconds) is not a--platform-optionkey. Set it in theredshiftsection of~/.benchbox/credentials.yaml, or pass it toRedshiftAdapterin the Python API:redshift:statement_timeout: 3600000
- Snowflake: BenchBox sets
-
Use larger compute resources:
Terminal window benchbox run --platform snowflake --benchmark tpch --scale 10 \--platform-option compute_resource=LARGE_WHA
compute_resourceon the command line overrides the warehouse saved bybenchbox setup.On Databricks,
compute_resourcenames the SQL warehouse and replaces the savedhttp_pathwith/sql/1.0/warehouses/<warehouse_id>:Terminal window benchbox run --platform databricks --benchmark tpch --scale 10 \--platform-option compute_resource=large_wh_id -
Reduce scale factor for testing:
Terminal window benchbox run --platform snowflake --benchmark tpch --scale 0.1
Memory Issues
Out of Memory
Symptoms:
MemoryError: Unable to allocateOutOfMemoryErrorjava.lang.OutOfMemoryError: Java heap spaceSolutions by Platform:
DuckDB
benchbox run --platform duckdb --benchmark tpch --scale 10 \ --platform-option memory_limit=8GB \ --platform-option temp_directory=/fast/ssd/tmpThe memory limit caps usage, and the temp directory is where DuckDB spills to disk once it reaches that limit.
Polars
benchbox run --platform polars-df --benchmark tpch --scale 10 \ --execution-engine streamingThe streaming engine lets Polars process large datasets without holding them all in memory.
Spark
benchbox run --platform spark --benchmark tpch --scale 10 \ --platform-option driver_memory=8gdriver_memory is the only Spark memory setting benchbox run accepts.
executor_memory is a SparkAdapter argument in the Python API.
Cloud Platforms
benchbox run --platform snowflake --benchmark tpch --scale 100 \ --platform-option compute_resource=X_LARGE_WHScale Factor Recommendations
| Platform | Max Recommended SF | Notes |
|---|---|---|
| DuckDB | 10-100 | Depends on RAM |
| SQLite | 0.1-1.0 | Not for OLAP |
| Polars | 10-100 | Enable streaming |
| Snowflake | 1000+ | Scale warehouse |
| Databricks | 1000+ | Scale cluster |
| BigQuery | 1000+ | Serverless |
Data Generation Issues
dbgen or dsdgen not found
Problem: TPC-H or TPC-DS data generation fails with an error indicating that dbgen or dsdgen is not found.
Solution:
BenchBox attempts to compile these tools automatically, but if that fails, you may need to compile them manually.
-
Navigate to the tools directory:
Terminal window cd _sources/tpc-h/dbgencd _sources/tpc-ds/toolsUse the first directory for TPC-H and the second for TPC-DS.
-
Compile the tools:
Terminal window makeIf you encounter compilation errors, you may need to install a C compiler and other build tools (
build-essentialon Debian/Ubuntu, Xcode Command Line Tools on macOS).
Slow Data Generation
Problem: Data generation is taking a very long time.
Solution:
- Use a smaller scale factor: For testing and development, use a small scale factor like
0.01. - Run power-only cycles first:
benchbox run --phases generate,load,powerlets you warm caches before expanding to throughput tests. - Check disk throughput: Write data to a fast local volume before copying it to network storage. Use the
--outputflag to point at SSD-backed paths. - Persist generated data: Reuse existing datasets with
--forceturned off (default) so future runs skip regeneration.
Data Loading Issues
File Not Found
Symptoms:
FileNotFoundError: Data file not foundNo such file or directorySolutions:
-
Generate data first:
Terminal window benchbox run --platform duckdb --benchmark tpch --scale 0.1 \--phases generate -
Check data directory:
Terminal window ls -la ~/.cache/benchbox/tpch/sf0.1/ -
Force regeneration:
Terminal window benchbox run --platform duckdb --benchmark tpch --scale 0.1 \--force datagen
Upload Failures
Symptoms:
UploadError: Failed to upload fileS3 upload failedStorage access deniedSolutions:
Cloud Storage Staging
aws s3 ls s3://your-bucket/benchbox/
aws s3 cp test.txt s3://your-bucket/benchbox/
benchbox run --platform redshift --benchmark tpch --scale 10 \ --output s3://your-bucket/benchbox/Snowflake Stages
snowsql -q "SHOW STAGES;"
snowsql -q "CREATE STAGE IF NOT EXISTS @~/benchbox_stage;"Databricks Volumes
databricks volumes list /Volumes/catalog/schema/
databricks volumes create catalog.schema.benchbox_dataPlatform-Specific Issues
Snowflake
Warehouse Suspended
snowsql -q "ALTER WAREHOUSE BENCHMARK_WH RESUME;"
snowsql -q "ALTER WAREHOUSE BENCHMARK_WH SET AUTO_RESUME = TRUE;"The first command resumes the suspended warehouse, and the second sets auto-resume so it restarts on demand.
Databricks
Cluster Not Running
curl -X POST "https://workspace.cloud.databricks.com/api/2.0/clusters/start" \ -H "Authorization: Bearer $DATABRICKS_TOKEN" \ -d '{"cluster_id": "your-cluster-id"}'Alternatively, use a SQL Warehouse, which has an always-on option.
BigQuery
Quota Exceeded
gcloud compute project-info describe --project $PROJECT_IDTo request an increase, use the Console: BigQuery > Quotas > Request Increase.
General Tips
- Use the
--verboseflag: The-vor-vvflag can provide more detailed output to help you diagnose issues. - Check the logs: BenchBox creates log files in the output directory. These can contain valuable information for troubleshooting.
- Start small: When testing a new setup, start with a small scale factor (e.g.,
0.01) to quickly verify that everything is working correctly.
Getting Help
Diagnostic Information
When reporting issues, include:
benchbox --versionpython --versionuname -a
benchbox platforms list
benchbox run --platform <platform> --benchmark tpch --scale 0.01 \ --verbose 2>&1 | tee benchmark_error.logResources
- GitHub Issues - Report bugs
- Platform Docs - Platform-specific guides
- Configuration Guide - Detailed options