> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/graphprotocol/graph-node/llms.txt
> Use this file to discover all available pages before exploring further.

# Environment Variables

> Complete reference of all Graph Node environment variables for configuration and tuning

Graph Node behavior can be extensively configured through environment variables. This reference documents all available variables organized by category.

<Warning>
  Some environment variable names may change in future releases. Always check the latest documentation when upgrading.
</Warning>

## General Settings

<ParamField path="GRAPH_NODE_ID" type="string" default="default">
  Unique identifier for this Graph Node instance

  Required when running multiple nodes in parallel. Each node must have a unique ID. The same node should use the same ID across restarts.

  ```bash theme={null}
  GRAPH_NODE_ID=index-node-1
  ```
</ParamField>

<ParamField path="GRAPH_NODE_ID_USE_LITERAL_VALUE" type="boolean">
  Use literal `node_id` value in Docker without replacing hyphens with underscores

  **Docker only**. Changing this for an existing installation requires updating `node_id` values in `subgraphs.subgraph_deployment_assignment` table.
</ParamField>

<ParamField path="GRAPH_LOG" type="string" default="info">
  Graph Node logging configuration

  Uses same syntax as Rust's [env\_logger](https://docs.rs/env_logger/latest/env_logger/).

  ```bash theme={null}
  # Set global level
  GRAPH_LOG=debug

  # Module-specific levels
  GRAPH_LOG=info,graph_store_postgres=debug

  # Complex filtering
  GRAPH_LOG=warn,graph_node::subgraph=info
  ```

  Levels: `error`, `warn`, `info`, `debug`, `trace`
</ParamField>

<ParamField path="GRAPH_LOG_TIME_FORMAT" type="string" default="%b %d %H:%M:%S%.3f">
  Custom log timestamp format

  Uses [chrono format syntax](https://docs.rs/chrono/latest/chrono/#formatting-and-parsing).

  ```bash theme={null}
  GRAPH_LOG_TIME_FORMAT="%Y-%m-%d %H:%M:%S"
  ```
</ParamField>

<ParamField path="GRAPH_LOG_QUERY_TIMING" type="string">
  Enable detailed query timing logs

  Comma-separated list: `sql`, `gql`, `cache`

  * **`gql`**: Log GraphQL queries with timing, subgraph, variables, and unique query\_id
  * **`sql`**: Log SQL queries with timing, bind variables, and entity counts
  * **`cache`**: Log cache hits/misses for GraphQL queries

  ```bash theme={null}
  GRAPH_LOG_QUERY_TIMING=gql,sql
  ```
</ParamField>

<ParamField path="GRAPH_LOG_POI_EVENTS" type="boolean">
  Log Proof of Indexing events deterministically

  Useful for debugging POI-related issues.
</ParamField>

<ParamField path="GRAPH_KILL_IF_UNRESPONSIVE" type="boolean">
  Kill the process if it becomes unresponsive

  Set to any value to enable.
</ParamField>

<ParamField path="GRAPH_KILL_IF_UNRESPONSIVE_TIMEOUT_SECS" type="number" default="10">
  Timeout in seconds before killing unresponsive node

  Only used if `GRAPH_KILL_IF_UNRESPONSIVE` is set.
</ParamField>

## Ethereum / EVM Chain Configuration

<ParamField path="ETHEREUM_REORG_THRESHOLD" type="number" default="250">
  Maximum expected reorg size in blocks

  If a larger reorg occurs, subgraphs may process inconsistent data.

  ```bash theme={null}
  ETHEREUM_REORG_THRESHOLD=500
  ```
</ParamField>

<ParamField path="ETHEREUM_POLLING_INTERVAL" type="number" default="500">
  How often to poll Ethereum for new blocks (milliseconds)

  ```bash theme={null}
  ETHEREUM_POLLING_INTERVAL=1000  # Poll every 1 second
  ```
</ParamField>

<ParamField path="GRAPH_ETHEREUM_TARGET_TRIGGERS_PER_BLOCK_RANGE" type="number" default="100">
  Target number of triggers to process per batch

  Too small: Excessive requests to Ethereum node
  Too large: Expensive calls and high memory usage
</ParamField>

<ParamField path="ETHEREUM_TRACE_STREAM_STEP_SIZE" type="number" default="50">
  Number of blocks to scan per RPC request when fetching traces

  Used for call handlers and block handlers with call filters.
</ParamField>

<ParamField path="ETHEREUM_BLOCK_BATCH_SIZE" type="number" default="10">
  Number of Ethereum blocks to request in parallel

  Also limits parallel requests like `trace_filter`.
</ParamField>

<ParamField path="GRAPH_ETHEREUM_MAX_BLOCK_RANGE_SIZE" type="number" default="1000">
  Maximum block range to scan for triggers in each request
</ParamField>

<ParamField path="GRAPH_ETHEREUM_MAX_EVENT_ONLY_RANGE" type="number" default="500">
  Maximum range for `eth_getLogs` requests filtering only by event signature (not contract address)
</ParamField>

<ParamField path="GRAPH_ETHEREUM_JSON_RPC_TIMEOUT" type="duration">
  Timeout for Ethereum JSON-RPC requests

  ```bash theme={null}
  GRAPH_ETHEREUM_JSON_RPC_TIMEOUT=60s
  ```
</ParamField>

<ParamField path="GRAPH_ETHEREUM_REQUEST_RETRIES" type="number" default="10">
  Number of retries for Ethereum JSON-RPC requests

  For requests that won't fail the subgraph but will restart syncing (e.g., requesting a reorged block).
</ParamField>

<ParamField path="GRAPH_ETHEREUM_BLOCK_INGESTOR_MAX_CONCURRENT_JSON_RPC_CALLS_FOR_TXN_RECEIPTS" type="number" default="1000">
  Maximum concurrent requests for transaction receipts during block ingestion
</ParamField>

<ParamField path="GRAPH_ETHEREUM_FETCH_TXN_RECEIPTS_IN_BATCHES" type="boolean">
  Fetch transaction receipts in batches instead of concurrently

  Automatically set to `true` on macOS to avoid DNS issues.
</ParamField>

<ParamField path="GRAPH_ETHEREUM_CLEANUP_BLOCKS" type="boolean">
  Clean up unneeded blocks from the cache

  **Development only**. In production, causes multiple downloads of the same blocks. Cannot be used with multiple shards.
</ParamField>

<ParamField path="GRAPH_ETHEREUM_GENESIS_BLOCK_NUMBER" type="number" default="0">
  Specify genesis block number
</ParamField>

<ParamField path="GRAPH_ETH_GET_LOGS_MAX_CONTRACTS" type="number" default="2000">
  Maximum number of contracts to query in a single `eth_getLogs` request
</ParamField>

<ParamField path="GRAPH_ETHEREUM_BLOCK_RECEIPTS_CHECK_TIMEOUT" type="number" default="10">
  Timeout (seconds) for checking `eth_getBlockReceipts` support

  If timeout occurs, individual transaction receipts are fetched instead.
</ParamField>

<ParamField path="DISABLE_BLOCK_INGESTOR" type="boolean">
  Disable block ingestion

  Set to `true` to disable, `false` or unset to enable.

  ```bash theme={null}
  DISABLE_BLOCK_INGESTOR=true
  ```
</ParamField>

## Firehose Configuration

<ParamField path="GRAPH_NODE_FIREHOSE_MAX_DECODE_SIZE" type="string" default="25MB">
  Maximum size of a message that can be decoded by Firehose

  ```bash theme={null}
  GRAPH_NODE_FIREHOSE_MAX_DECODE_SIZE=50MB
  ```
</ParamField>

## Mapping Handlers

<ParamField path="GRAPH_MAPPING_HANDLER_TIMEOUT" type="number">
  Maximum execution time for a mapping handler (seconds)

  Default: unlimited

  ```bash theme={null}
  GRAPH_MAPPING_HANDLER_TIMEOUT=30
  ```
</ParamField>

<ParamField path="GRAPH_ENTITY_CACHE_SIZE" type="number" default="10000">
  Entity cache size in kilobytes

  Default is 10MB.

  ```bash theme={null}
  GRAPH_ENTITY_CACHE_SIZE=50000  # 50MB
  ```
</ParamField>

<ParamField path="GRAPH_MAX_API_VERSION" type="string" default="0.0.7">
  Maximum supported `apiVersion` in subgraph manifests

  Subgraphs with higher versions will be rejected.
</ParamField>

<ParamField path="GRAPH_MAX_SPEC_VERSION" type="string" default="0.0.5">
  Maximum supported `specVersion` in subgraph manifests

  Subgraphs with higher versions will be rejected.
</ParamField>

<ParamField path="GRAPH_RUNTIME_MAX_STACK_SIZE" type="string" default="512KiB">
  Maximum WASM runtime stack size

  Execution stops with an error if exceeded.

  ```bash theme={null}
  GRAPH_RUNTIME_MAX_STACK_SIZE=1024KiB
  ```
</ParamField>

## IPFS Configuration

<ParamField path="GRAPH_IPFS_TIMEOUT" type="number" default="60">
  Timeout for IPFS requests (seconds)

  Includes manifest files and `ipfs.cat` calls from mappings.
</ParamField>

<ParamField path="GRAPH_MAX_IPFS_FILE_BYTES" type="number" default="26214400">
  Maximum file size for `ipfs.cat` calls (bytes)

  Default: 25 MiB

  Affects both subgraph files and file data sources.
</ParamField>

<ParamField path="GRAPH_MAX_IPFS_MAP_FILE_SIZE" type="number" default="268435456">
  Maximum file size for `ipfs.map` (bytes)

  Default: 256 MB

  Entities from `ipfs.map` are kept in memory during processing.
</ParamField>

<ParamField path="GRAPH_MAX_IPFS_CACHE_SIZE" type="number" default="50">
  Maximum number of files to cache from IPFS
</ParamField>

<ParamField path="GRAPH_MAX_IPFS_CACHE_FILE_SIZE" type="number" default="1048576">
  Maximum size of each cached IPFS file (bytes)

  Default: 1 MiB
</ParamField>

<ParamField path="GRAPH_IPFS_REQUEST_LIMIT" type="number" default="100">
  Rate limit for IPFS file data source requests (per second)
</ParamField>

<ParamField path="GRAPH_IPFS_MAX_ATTEMPTS" type="number" default="100000">
  Maximum retry attempts for IPFS requests

  Prevents infinite retries on file not found or other errors.
</ParamField>

<ParamField path="GRAPH_IPFS_CACHE_LOCATION" type="string">
  File or Redis cache location for IPFS files

  **Experimental**. Can be:

  * `redis://host:port` - Redis cache
  * `/path/to/directory` - Filesystem cache (must be writable)

  ```bash theme={null}
  GRAPH_IPFS_CACHE_LOCATION=redis://localhost:6379
  GRAPH_IPFS_CACHE_LOCATION=/var/cache/graph-node/ipfs
  ```
</ParamField>

<ParamField path="GRAPH_ALLOW_NON_DETERMINISTIC_IPFS" type="boolean">
  Enable `ipfs.cat` in subgraph mappings

  **Experimental and non-deterministic**. Will be removed in future versions.
</ParamField>

## GraphQL Configuration

<ParamField path="GRAPH_GRAPHQL_QUERY_TIMEOUT" type="number">
  Maximum GraphQL query execution time (seconds)

  Default: unlimited

  ```bash theme={null}
  GRAPH_GRAPHQL_QUERY_TIMEOUT=60
  ```
</ParamField>

<ParamField path="GRAPH_GRAPHQL_MAX_COMPLEXITY" type="number">
  Maximum GraphQL query [complexity](https://developer.github.com/v4/guides/resource-limitations)

  Default: unlimited

  Introspection queries have complexity \~1 million. Set higher than that to allow introspection.

  ```bash theme={null}
  GRAPH_GRAPHQL_MAX_COMPLEXITY=10000000
  ```
</ParamField>

<ParamField path="GRAPH_GRAPHQL_MAX_DEPTH" type="number" default="255">
  Maximum GraphQL query depth

  Maximum allowed: 255
</ParamField>

<ParamField path="GRAPH_GRAPHQL_MAX_FIRST" type="number" default="1000">
  Maximum value for `first` argument in queries

  ```bash theme={null}
  GRAPH_GRAPHQL_MAX_FIRST=500
  ```
</ParamField>

<ParamField path="GRAPH_GRAPHQL_MAX_SKIP" type="number">
  Maximum value for `skip` argument in queries

  Default: unlimited
</ParamField>

<ParamField path="GRAPH_GRAPHQL_WARN_RESULT_SIZE" type="number">
  Log warning if GraphQL result exceeds this size (bytes)

  Default: unlimited

  ```bash theme={null}
  GRAPH_GRAPHQL_WARN_RESULT_SIZE=10000000  # 10MB
  ```
</ParamField>

<ParamField path="GRAPH_GRAPHQL_ERROR_RESULT_SIZE" type="number">
  Return error if GraphQL result exceeds this size (bytes)

  Default: unlimited

  Checked during response construction to prevent excessive memory use.
</ParamField>

<ParamField path="GRAPH_GRAPHQL_HTTP_PORT" type="number" default="8000">
  Port for GraphQL HTTP server
</ParamField>

<ParamField path="GRAPH_SQL_STATEMENT_TIMEOUT" type="number">
  Maximum SQL query execution time during GraphQL execution (seconds)

  Default: unlimited
</ParamField>

<ParamField path="ENABLE_GRAPHQL_VALIDATIONS" type="boolean" default="false">
  Enable GraphQL specification validations

  Validates queries follow GraphQL execution rules.
</ParamField>

<ParamField path="SILENT_GRAPHQL_VALIDATIONS" type="boolean" default="true">
  Only log GraphQL validation errors without failing queries

  Only used if `ENABLE_GRAPHQL_VALIDATIONS=true`.

  Queries may still fail during execution stage.
</ParamField>

<ParamField path="GRAPH_GRAPHQL_DISABLE_BOOL_FILTERS" type="boolean">
  Disable AND/OR filters for performance

  Useful if complex filters cause performance issues.
</ParamField>

<ParamField path="GRAPH_GRAPHQL_DISABLE_CHILD_SORTING" type="boolean">
  Disable child-based sorting for performance

  Useful if child sorting causes performance issues.
</ParamField>

<ParamField path="GRAPH_GRAPHQL_TRACE_TOKEN" type="string">
  Token to enable query tracing

  Requests with `X-GraphTraceQuery` header matching this token will include SQL query traces.

  ```bash theme={null}
  GRAPH_GRAPHQL_TRACE_TOKEN=secret-trace-token
  ```

  Then in requests:

  ```bash theme={null}
  curl -H "X-GraphTraceQuery: secret-trace-token" http://localhost:8000/subgraphs/name/my-subgraph
  ```
</ParamField>

### GraphQL Query Caching

<ParamField path="GRAPH_CACHED_SUBGRAPH_IDS" type="string" default="*">
  Subgraphs to cache queries for

  * `*`: Cache all subgraphs (default)
  * Comma-separated list: Cache specific subgraphs

  ```bash theme={null}
  GRAPH_CACHED_SUBGRAPH_IDS=QmSubgraph1,QmSubgraph2
  ```
</ParamField>

<ParamField path="GRAPH_QUERY_CACHE_BLOCKS" type="number" default="1">
  Number of recent blocks per network to keep in query cache

  Set to `0` to disable caching. Keep small as lookup time and memory are proportional to this value.
</ParamField>

<ParamField path="GRAPH_QUERY_CACHE_MAX_MEM" type="number" default="1000">
  Maximum memory for query cache (MB)

  Default: 1 GB

  Total cache memory is 2x this value (recent blocks + frequent queries).
</ParamField>

<ParamField path="GRAPH_QUERY_CACHE_STALE_PERIOD" type="number" default="100">
  Number of queries after which a cache entry can be considered stale
</ParamField>

<ParamField path="GRAPH_QUERY_CACHE_MAX_ENTRY_RATIO" type="number" default="3">
  Maximum cache entry size ratio

  Results larger than (cache shard size / ratio) won't be cached.

  Set to `0` for no limit.
</ParamField>

## Database Configuration

<ParamField path="STORE_CONNECTION_POOL_SIZE" type="number" default="10">
  Database connection pool size

  May not be strictly adhered to due to implementation details.
</ParamField>

<ParamField path="GRAPH_STORE_CONNECTION_TIMEOUT" type="number" default="5000">
  Database connection timeout (milliseconds)

  If exceeded, database is assumed down.
</ParamField>

<ParamField path="GRAPH_STORE_SETUP_TIMEOUT" type="number" default="30000">
  Database setup operation timeout (milliseconds)

  Default: 30 seconds

  Used for migrations and schema creation, which may take longer than normal operations.
</ParamField>

<ParamField path="GRAPH_STORE_CONNECTION_UNAVAILABLE_RETRY" type="number" default="2">
  Probe interval when database shard is unavailable (seconds)

  Only one request per interval attempts connection; others fail instantly.
</ParamField>

<ParamField path="THEGRAPH_STORE_POSTGRES_DIESEL_URL" type="string">
  PostgreSQL URL for running tests

  Format: `postgresql://user:password@host:port/database`

  ```bash theme={null}
  THEGRAPH_STORE_POSTGRES_DIESEL_URL=postgresql://graph:graph@localhost:5432/graph-test
  ```
</ParamField>

<ParamField path="GRAPH_STORE_BATCH_TARGET_DURATION" type="number" default="180">
  Target duration for batch operations during copying/grafting (seconds)

  Controls transaction length for long-running operations.
</ParamField>

<ParamField path="GRAPH_STORE_BATCH_TIMEOUT" type="number">
  Maximum batch operation timeout (seconds)

  Default: unlimited

  Should be a small multiple (e.g., 10x) of `GRAPH_STORE_BATCH_TARGET_DURATION`.

  If hit, batch size resets to 1 and retries.
</ParamField>

<ParamField path="GRAPH_STORE_BATCH_WORKERS" type="number" default="1">
  Number of parallel workers for batch operations

  Minimum: 1

  Uses idle connections to copy tables in parallel during subgraph copy operations.
</ParamField>

<ParamField path="GRAPH_STORE_WRITE_BATCH_DURATION" type="number" default="300">
  How long to accumulate changes before writing (seconds)

  Set to `0` to disable write batching.
</ParamField>

<ParamField path="GRAPH_STORE_WRITE_BATCH_SIZE" type="number" default="10000">
  How many changes to accumulate before writing (kilobytes)

  Default: 10 MB

  Set to `0` to disable write batching.
</ParamField>

<ParamField path="GRAPH_STORE_DISABLE_CALL_CACHE" type="boolean" default="false">
  Disable storing/reading `eth_call` results from cache

  Useful for indexers running their own RPC nodes. May significantly impact performance depending on `eth_call` execution time vs database lookup cost.
</ParamField>

<ParamField path="GRAPH_POSTPONE_ATTRIBUTE_INDEX_CREATION" type="boolean">
  Postpone creating attribute-based indexes during subgraph copy

  Can speed up syncing.
</ParamField>

<ParamField path="GRAPH_STORE_INSERT_EXTRA_COLS" type="number" default="0">
  Workaround for 'too many parameters' PostgreSQL errors

  If encountering "number of parameters must be between 0 and 65535" errors, set to \~10.

  Such errors are always Graph Node bugs; this provides a temporary workaround.
</ParamField>

### Database Pruning and History

<ParamField path="GRAPH_STORE_HISTORY_SLACK_FACTOR" type="number" default="1.2">
  History accumulation threshold before pruning

  Minimum: 1.01

  At 1.2, subgraph is pruned when it contains 20% more history than its limit.
</ParamField>

<ParamField path="GRAPH_STORE_HISTORY_REBUILD_THRESHOLD" type="number" default="0.5">
  Prune by copying entities to new tables if removing more than this fraction

  Must be between 0 and 1, and greater than `DELETE_THRESHOLD`.
</ParamField>

<ParamField path="GRAPH_STORE_HISTORY_DELETE_THRESHOLD" type="number" default="0.05">
  Prune by deleting from existing tables if removing between this and REBUILD\_THRESHOLD

  Must be between 0 and 1, and less than `REBUILD_THRESHOLD`.

  If removing less than this threshold, no pruning occurs.
</ParamField>

<ParamField path="GRAPH_MIN_HISTORY_BLOCKS" type="number">
  Minimum blocks to retain for subgraphs with `historyBlocks: auto`

  Default: 2 × reorg threshold
</ParamField>

<ParamField path="GRAPH_REMOVE_UNUSED_INTERVAL" type="number" default="360">
  How long to wait before removing unused deployments (minutes)

  Default: 6 hours

  Graph Node periodically marks unused deployments, then waits this interval before deletion.
</ParamField>

### Experimental Database Features

<ParamField path="GRAPH_ENABLE_SQL_QUERIES" type="boolean" default="false">
  Enable experimental SQL query interface
</ParamField>

<ParamField path="GRAPH_STORE_ACCOUNT_LIKE_SCAN_INTERVAL_HOURS" type="number">
  Interval for account-like optimization scan (hours)

  Requires also setting:

  * `GRAPH_STORE_ACCOUNT_LIKE_MIN_VERSIONS_COUNT`
  * `GRAPH_STORE_ACCOUNT_LIKE_MAX_UNIQUE_RATIO`

  Scans for tables that benefit from [account-like optimization](https://thegraph.com/docs/en/indexing/tooling/graph-node/#account-like-optimisation).

  Reads from `info.table_stats` materialized view (refreshes every 6 hours).
</ParamField>

<ParamField path="GRAPH_STORE_ACCOUNT_LIKE_MIN_VERSIONS_COUNT" type="number">
  Minimum total versions for account-like flagging

  Required for account-like optimization scan.
</ParamField>

<ParamField path="GRAPH_STORE_ACCOUNT_LIKE_MAX_UNIQUE_RATIO" type="number">
  Maximum unique entities to version ratio

  Example: 0.01 ≈ 1:100 entity-to-version ratio

  Required for account-like optimization scan.
</ParamField>

## Load Management

<ParamField path="GRAPH_LOAD_WINDOW_SIZE" type="number" default="300">
  Load measurement window size (seconds)

  Used with `GRAPH_LOAD_BIN_SIZE` for load throttling.
</ParamField>

<ParamField path="GRAPH_LOAD_BIN_SIZE" type="number" default="1">
  Load measurement bin size (seconds)

  Measurements within window are binned into intervals of this size.
</ParamField>

<ParamField path="GRAPH_LOAD_THRESHOLD" type="number" default="0">
  Database connection wait time threshold for throttling (milliseconds)

  Default: 0 (throttling disabled)

  If connection wait times exceed this, queries are throttled until wait times drop below threshold.

  ```bash theme={null}
  GRAPH_LOAD_THRESHOLD=100  # Throttle if waits exceed 100ms
  ```
</ParamField>

<ParamField path="GRAPH_LOAD_JAIL_THRESHOLD" type="number">
  Effort fraction threshold for permanently rejecting queries

  When overloaded, queries causing more than this fraction of effort are permanently rejected (even after overload resolves).

  If unset, no queries are jailed (but still subject to throttling).

  ```bash theme={null}
  GRAPH_LOAD_JAIL_THRESHOLD=0.1  # Jail queries using >10% of effort
  ```
</ParamField>

<ParamField path="GRAPH_LOAD_SIMULATE" type="boolean" default="false">
  Simulate load management without declining queries

  Performs all load management steps but only logs decisions instead of rejecting queries.
</ParamField>

## Subgraph Features

<ParamField path="EXPERIMENTAL_SUBGRAPH_VERSION_SWITCHING_MODE" type="string" default="instant">
  Subgraph version switching behavior

  * `instant`: Switch immediately when new version deployed
  * `synced`: Only switch after new deployment syncs (becomes "Pending" version)
</ParamField>

<ParamField path="GRAPH_START_BLOCK" type="string">
  Starting block for forked subgraph

  Format: `block_hash:block_number`

  ```bash theme={null}
  GRAPH_START_BLOCK=0xabc123...:15000000
  ```
</ParamField>

<ParamField path="GRAPH_FORK_BASE" type="string">
  API URL for subgraph forking

  ```bash theme={null}
  GRAPH_FORK_BASE=https://api.thegraph.com/subgraphs/id/
  ```
</ParamField>

<ParamField path="GRAPH_DEBUG_FORK" type="string">
  IPFS hash of subgraph to fork

  ```bash theme={null}
  GRAPH_DEBUG_FORK=QmSubgraphHash
  ```
</ParamField>

## Example Configurations

### Development Environment

```bash theme={null}
# Logging
export GRAPH_LOG=debug
export GRAPH_LOG_QUERY_TIMING=gql,sql

# Ethereum
export ETHEREUM_POLLING_INTERVAL=1000
export ETHEREUM_REORG_THRESHOLD=50

# Performance
export GRAPH_ENTITY_CACHE_SIZE=50000
export GRAPH_ETHEREUM_TARGET_TRIGGERS_PER_BLOCK_RANGE=50

# GraphQL
export GRAPH_GRAPHQL_MAX_FIRST=500
export GRAPH_GRAPHQL_QUERY_TIMEOUT=120
```

### Production Environment

```bash theme={null}
# Logging
export GRAPH_LOG=info

# High availability
export GRAPH_KILL_IF_UNRESPONSIVE=true
export GRAPH_KILL_IF_UNRESPONSIVE_TIMEOUT_SECS=30

# Ethereum
export ETHEREUM_REORG_THRESHOLD=250
export ETHEREUM_POLLING_INTERVAL=500
export GRAPH_ETHEREUM_TARGET_TRIGGERS_PER_BLOCK_RANGE=100
export GRAPH_ETHEREUM_BLOCK_BATCH_SIZE=20

# Performance
export GRAPH_ENTITY_CACHE_SIZE=100000
export STORE_CONNECTION_POOL_SIZE=25
export GRAPH_STORE_WRITE_BATCH_SIZE=20000

# GraphQL limits
export GRAPH_GRAPHQL_MAX_COMPLEXITY=5000000
export GRAPH_GRAPHQL_MAX_FIRST=1000
export GRAPH_GRAPHQL_MAX_DEPTH=100
export GRAPH_GRAPHQL_QUERY_TIMEOUT=60
export GRAPH_SQL_STATEMENT_TIMEOUT=30

# Query caching
export GRAPH_QUERY_CACHE_BLOCKS=2
export GRAPH_QUERY_CACHE_MAX_MEM=2000

# Load management
export GRAPH_LOAD_THRESHOLD=50
export GRAPH_LOAD_JAIL_THRESHOLD=0.2
```

### Query Node

```bash theme={null}
# Node role
export GRAPH_NODE_ID=query-node-1
export DISABLE_BLOCK_INGESTOR=true

# Logging
export GRAPH_LOG=info

# Database
export STORE_CONNECTION_POOL_SIZE=100

# GraphQL
export GRAPH_GRAPHQL_MAX_COMPLEXITY=10000000
export GRAPH_GRAPHQL_MAX_FIRST=1000
export GRAPH_GRAPHQL_QUERY_TIMEOUT=60

# Caching
export GRAPH_QUERY_CACHE_BLOCKS=3
export GRAPH_QUERY_CACHE_MAX_MEM=5000

# Load management
export GRAPH_LOAD_THRESHOLD=100
export GRAPH_LOAD_JAIL_THRESHOLD=0.15
```

### Index Node

```bash theme={null}
# Node role
export GRAPH_NODE_ID=index-node-1

# Logging
export GRAPH_LOG=info

# Database
export STORE_CONNECTION_POOL_SIZE=20

# Ethereum
export ETHEREUM_POLLING_INTERVAL=500
export ETHEREUM_REORG_THRESHOLD=250
export GRAPH_ETHEREUM_TARGET_TRIGGERS_PER_BLOCK_RANGE=100
export GRAPH_ETHEREUM_BLOCK_BATCH_SIZE=10

# Performance
export GRAPH_ENTITY_CACHE_SIZE=100000
export GRAPH_STORE_WRITE_BATCH_DURATION=300
export GRAPH_STORE_WRITE_BATCH_SIZE=20000

# IPFS
export GRAPH_IPFS_TIMEOUT=120
export GRAPH_MAX_IPFS_FILE_BYTES=52428800  # 50 MiB
```

## Next Steps

* [Docker Setup](/running/docker-setup) - Run Graph Node with Docker
* [Configuration Overview](/running/configuration) - Advanced TOML configuration
* [Building from Source](/running/from-source) - Compile Graph Node
