---
title: Debug
description: Generate Go runtime profiling and trace reports for troubleshooting and performance analysis of an InfluxDB OSS v2 instance.
url: https://docs.influxdata.com/influxdb/v2/api/debug/
estimated_tokens: 14417
product: InfluxDB OSS v2
version: v2
---

[Download InfluxDB API Spec](/openapi/influxdb-oss-v2-api.yml)

Generate Go runtime profiling and trace reports for troubleshooting and performance analysis of an InfluxDB OSS v2 instance.

GET `/debug/pprof/all`

### Retrieve all runtime profiles

Collects samples and returns reports for the following [Go runtime profiles](https://pkg.go.dev/runtime/pprof):

-   **allocs**: All past memory allocations
-   **block**: Stack traces that led to blocking on synchronization primitives
-   **cpu**: (Optional) Program counters sampled from the executing stack. Include by passing the `cpu` query parameter with a [duration](/influxdb/v2/reference/glossary/#duration) value. Equivalent to the report from [`GET /debug/pprof/profile?seconds=NUMBER_OF_SECONDS`](#operation/GetDebugPprofProfile).
-   **goroutine**: All current goroutines
-   **heap**: Memory allocations for live objects
-   **mutex**: Holders of contended mutexes
-   **threadcreate**: Stack traces that led to the creation of new OS threads

#### Parameters

##### Query parameters

`cpu` string <duration>

Collects and returns CPU profiling data for the specified [duration](/influxdb/v2/reference/glossary/#duration).

##### Header parameters

`Zap-Trace-Span` string

OpenTracing span context

Example request [Ask AI about this](#)

```sh
curl --request GET \
  "http://localhost:8086/debug/pprof/all" \
  --header "Authorization: Bearer INFLUX_TOKEN"
```

#### Responses

200 [Go runtime profile](https://pkg.go.dev/runtime/pprof) reports.

default Non 2XX error response from server.

`code` required string

code is the machine-readable error code.

Allowed: `internal error` , `not implemented` , `not found` , `conflict` , `invalid` , `unprocessable entity` , `empty value` , `unavailable` , `forbidden` , `too many requests` , `unauthorized` , `method not allowed` , `request too large` , `unsupported media type`

`err` string

Stack of errors that occurred during processing of the request. Useful for debugging.

`message` string

Human-readable message.

`op` string

Describes the logical code operation when the error occurred. Useful for debugging.

GET `/debug/pprof/allocs`

### Retrieve the memory allocations runtime profile

Returns a [Go runtime profile](https://pkg.go.dev/runtime/pprof) report of all past memory allocations. **allocs** is the same as the **heap** profile, but changes the default [pprof](https://pkg.go.dev/runtime/pprof) display to **\-alloc\_space**, the total number of bytes allocated since the program began (including garbage-collected bytes).

#### Parameters

##### Query parameters

`debug` integer <int64>

-   `0`: (Default) Return the report as a gzip-compressed protocol buffer.
-   `1`: Return a response body with the report formatted as human-readable text. The report contains comments that translate addresses to function names and line numbers for debugging.

`debug=1` is mutually exclusive with the `seconds` query parameter.

Allowed values: `0` , `1`

`seconds` string <int64>

Number of seconds to collect statistics.

`seconds` is mutually exclusive with `debug=1`.

##### Header parameters

`Zap-Trace-Span` string

OpenTracing span context

Example request [Ask AI about this](#)

```sh
curl --request GET \
  "http://localhost:8086/debug/pprof/allocs" \
  --header "Authorization: Bearer INFLUX_TOKEN"
```

#### Responses

200 [Go runtime profile](https://pkg.go.dev/runtime/pprof) report compatible with [pprof](https://github.com/google/pprof) analysis and visualization tools. If debug is enabled (`?debug=1`), response body contains a human-readable profile.

default Non 2XX error response from server.

`code` required string

code is the machine-readable error code.

Allowed: `internal error` , `not implemented` , `not found` , `conflict` , `invalid` , `unprocessable entity` , `empty value` , `unavailable` , `forbidden` , `too many requests` , `unauthorized` , `method not allowed` , `request too large` , `unsupported media type`

`err` string

Stack of errors that occurred during processing of the request. Useful for debugging.

`message` string

Human-readable message.

`op` string

Describes the logical code operation when the error occurred. Useful for debugging.

GET `/debug/pprof/block`

### Retrieve the block runtime profile

Collects samples and returns a [Go runtime profile](https://pkg.go.dev/runtime/pprof) report of stack traces that led to blocking on synchronization primitives.

#### Parameters

##### Query parameters

`debug` integer <int64>

-   `0`: (Default) Return the report as a gzip-compressed protocol buffer.
-   `1`: Return a response body with the report formatted as human-readable text. The report contains comments that translate addresses to function names and line numbers for debugging.

`debug=1` is mutually exclusive with the `seconds` query parameter.

Allowed values: `0` , `1`

`seconds` string <int64>

Number of seconds to collect statistics.

`seconds` is mutually exclusive with `debug=1`.

##### Header parameters

`Zap-Trace-Span` string

OpenTracing span context

Example request [Ask AI about this](#)

```sh
curl --request GET \
  "http://localhost:8086/debug/pprof/block" \
  --header "Authorization: Bearer INFLUX_TOKEN"
```

#### Responses

200 [Go runtime profile](https://pkg.go.dev/runtime/pprof) report compatible with [pprof](https://github.com/google/pprof) analysis and visualization tools. If debug is enabled (`?debug=1`), response body contains a human-readable profile.

default Non 2XX error response from server.

`code` required string

code is the machine-readable error code.

Allowed: `internal error` , `not implemented` , `not found` , `conflict` , `invalid` , `unprocessable entity` , `empty value` , `unavailable` , `forbidden` , `too many requests` , `unauthorized` , `method not allowed` , `request too large` , `unsupported media type`

`err` string

Stack of errors that occurred during processing of the request. Useful for debugging.

`message` string

Human-readable message.

`op` string

Describes the logical code operation when the error occurred. Useful for debugging.

GET `/debug/pprof/cmdline`

### Retrieve the command line invocation

Returns the command line that invoked InfluxDB.

#### Parameters

##### Header parameters

`Zap-Trace-Span` string

OpenTracing span context

Example request [Ask AI about this](#)

```sh
curl --request GET \
  "http://localhost:8086/debug/pprof/cmdline" \
  --header "Authorization: Bearer INFLUX_TOKEN"
```

#### Responses

200 Command line invocation.

default Non 2XX error response from server.

`code` required string

code is the machine-readable error code.

Allowed: `internal error` , `not implemented` , `not found` , `conflict` , `invalid` , `unprocessable entity` , `empty value` , `unavailable` , `forbidden` , `too many requests` , `unauthorized` , `method not allowed` , `request too large` , `unsupported media type`

`err` string

Stack of errors that occurred during processing of the request. Useful for debugging.

`message` string

Human-readable message.

`op` string

Describes the logical code operation when the error occurred. Useful for debugging.

GET `/debug/pprof/goroutine`

### Retrieve the goroutines runtime profile

Collects statistics and returns a [Go runtime profile](https://pkg.go.dev/runtime/pprof) report of all current goroutines.

#### Parameters

##### Query parameters

`debug` integer <int64>

-   `0`: (Default) Return the report as a gzip-compressed protocol buffer.
-   `1`: Return a response body with the report formatted as human-readable text with comments that translate addresses to function names and line numbers for debugging.

`debug=1` is mutually exclusive with the `seconds` query parameter.

Allowed values: `0` , `1`

`seconds` string <int64>

Number of seconds to collect statistics.

`seconds` is mutually exclusive with `debug=1`.

##### Header parameters

`Zap-Trace-Span` string

OpenTracing span context

Example request [Ask AI about this](#)

```sh
curl --request GET \
  "http://localhost:8086/debug/pprof/goroutine" \
  --header "Authorization: Bearer INFLUX_TOKEN"
```

#### Responses

200 [Go runtime profile](https://pkg.go.dev/runtime/pprof) report compatible with [pprof](https://github.com/google/pprof) analysis and visualization tools. If debug is enabled (`?debug=1`), response body contains a human-readable profile.

default Non 2XX error response from server.

`code` required string

code is the machine-readable error code.

Allowed: `internal error` , `not implemented` , `not found` , `conflict` , `invalid` , `unprocessable entity` , `empty value` , `unavailable` , `forbidden` , `too many requests` , `unauthorized` , `method not allowed` , `request too large` , `unsupported media type`

`err` string

Stack of errors that occurred during processing of the request. Useful for debugging.

`message` string

Human-readable message.

`op` string

Describes the logical code operation when the error occurred. Useful for debugging.

GET `/debug/pprof/heap`

### Retrieve the heap runtime profile

Collects statistics and returns a [Go runtime profile](https://pkg.go.dev/runtime/pprof) report of memory allocations for live objects.

To run **garbage collection** before sampling, pass the `gc` query parameter with a value of `1`.

#### Parameters

##### Query parameters

`debug` integer <int64>

-   `0`: (Default) Return the report as a gzip-compressed protocol buffer.
-   `1`: Return a response body with the report formatted as human-readable text. The report contains comments that translate addresses to function names and line numbers for debugging.

`debug=1` is mutually exclusive with the `seconds` query parameter.

Allowed values: `0` , `1`

`seconds` string <int64>

Number of seconds to collect statistics.

`seconds` is mutually exclusive with `debug=1`.

`gc` integer <int64>

-   `0`: (Default) don’t force garbage collection before sampling.
-   `1`: Force garbage collection before sampling.

Allowed values: `0` , `1`

##### Header parameters

`Zap-Trace-Span` string

OpenTracing span context

Example request [Ask AI about this](#)

```sh
curl --request GET \
  "http://localhost:8086/debug/pprof/heap" \
  --header "Authorization: Bearer INFLUX_TOKEN"
```

#### Responses

200 [Go runtime profile](https://pkg.go.dev/runtime/pprof) report compatible with [pprof](https://github.com/google/pprof) analysis and visualization tools. If debug is enabled (`?debug=1`), response body contains a human-readable profile.

default Non 2XX error response from server.

`code` required string

code is the machine-readable error code.

Allowed: `internal error` , `not implemented` , `not found` , `conflict` , `invalid` , `unprocessable entity` , `empty value` , `unavailable` , `forbidden` , `too many requests` , `unauthorized` , `method not allowed` , `request too large` , `unsupported media type`

`err` string

Stack of errors that occurred during processing of the request. Useful for debugging.

`message` string

Human-readable message.

`op` string

Describes the logical code operation when the error occurred. Useful for debugging.

GET `/debug/pprof/mutex`

### Retrieve the mutual exclusion (mutex) runtime profile

Collects statistics and returns a [Go runtime profile](https://pkg.go.dev/runtime/pprof) report of lock contentions. The profile contains stack traces of holders of contended mutual exclusions (mutexes).

#### Parameters

##### Query parameters

`debug` integer <int64>

-   `0`: (Default) Return the report as a gzip-compressed protocol buffer.
-   `1`: Return a response body with the report formatted as human-readable text. The report contains comments that translate addresses to function names and line numbers for debugging.

`debug=1` is mutually exclusive with the `seconds` query parameter.

Allowed values: `0` , `1`

`seconds` string <int64>

Number of seconds to collect statistics.

`seconds` is mutually exclusive with `debug=1`.

##### Header parameters

`Zap-Trace-Span` string

OpenTracing span context

Example request [Ask AI about this](#)

```sh
curl --request GET \
  "http://localhost:8086/debug/pprof/mutex" \
  --header "Authorization: Bearer INFLUX_TOKEN"
```

#### Responses

200 [Go runtime profile](https://pkg.go.dev/runtime/pprof) report compatible with [pprof](https://github.com/google/pprof) analysis and visualization tools. If debug is enabled (`?debug=1`), response body contains a human-readable profile.

default Non 2XX error response from server.

`code` required string

code is the machine-readable error code.

Allowed: `internal error` , `not implemented` , `not found` , `conflict` , `invalid` , `unprocessable entity` , `empty value` , `unavailable` , `forbidden` , `too many requests` , `unauthorized` , `method not allowed` , `request too large` , `unsupported media type`

`err` string

Stack of errors that occurred during processing of the request. Useful for debugging.

`message` string

Human-readable message.

`op` string

Describes the logical code operation when the error occurred. Useful for debugging.

GET `/debug/pprof/profile`

### Retrieve the CPU runtime profile

Collects statistics and returns a [Go runtime profile](https://pkg.go.dev/runtime/pprof) report of program counters on the executing stack.

#### Parameters

##### Query parameters

`seconds` string <int64>

Number of seconds to collect profile data. Default is `30` seconds.

##### Header parameters

`Zap-Trace-Span` string

OpenTracing span context

Example request [Ask AI about this](#)

```sh
curl --request GET \
  "http://localhost:8086/debug/pprof/profile" \
  --header "Authorization: Bearer INFLUX_TOKEN"
```

#### Responses

200 [Go runtime profile](https://pkg.go.dev/runtime/pprof) report compatible with [pprof](https://github.com/google/pprof) analysis and visualization tools.

default Non 2XX error response from server.

`code` required string

code is the machine-readable error code.

Allowed: `internal error` , `not implemented` , `not found` , `conflict` , `invalid` , `unprocessable entity` , `empty value` , `unavailable` , `forbidden` , `too many requests` , `unauthorized` , `method not allowed` , `request too large` , `unsupported media type`

`err` string

Stack of errors that occurred during processing of the request. Useful for debugging.

`message` string

Human-readable message.

`op` string

Describes the logical code operation when the error occurred. Useful for debugging.

GET `/debug/pprof/threadcreate`

### Retrieve the threadcreate runtime profile

Collects statistics and returns a [Go runtime profile](https://pkg.go.dev/runtime/pprof) report of stack traces that led to the creation of new OS threads.

#### Parameters

##### Query parameters

`debug` integer <int64>

-   `0`: (Default) Return the report as a gzip-compressed protocol buffer.
-   `1`: Return a response body with the report formatted as human-readable text. The report contains comments that translate addresses to function names and line numbers for debugging.

`debug=1` is mutually exclusive with the `seconds` query parameter.

Allowed values: `0` , `1`

`seconds` string <int64>

Number of seconds to collect statistics.

`seconds` is mutually exclusive with `debug=1`.

##### Header parameters

`Zap-Trace-Span` string

OpenTracing span context

Example request [Ask AI about this](#)

```sh
curl --request GET \
  "http://localhost:8086/debug/pprof/threadcreate" \
  --header "Authorization: Bearer INFLUX_TOKEN"
```

#### Responses

200 [Go runtime profile](https://pkg.go.dev/runtime/pprof) report compatible with [pprof](https://github.com/google/pprof) analysis and visualization tools. If debug is enabled (`?debug=1`), response body contains a human-readable profile.

default Non 2XX error response from server.

`code` required string

code is the machine-readable error code.

Allowed: `internal error` , `not implemented` , `not found` , `conflict` , `invalid` , `unprocessable entity` , `empty value` , `unavailable` , `forbidden` , `too many requests` , `unauthorized` , `method not allowed` , `request too large` , `unsupported media type`

`err` string

Stack of errors that occurred during processing of the request. Useful for debugging.

`message` string

Human-readable message.

`op` string

Describes the logical code operation when the error occurred. Useful for debugging.

GET `/debug/pprof/trace`

### Retrieve the runtime execution trace

Collects profile data and returns trace execution events for the current program.

#### Parameters

##### Query parameters

`seconds` string <int64>

Number of seconds to collect profile data.

##### Header parameters

`Zap-Trace-Span` string

OpenTracing span context

Example request [Ask AI about this](#)

```sh
curl --request GET \
  "http://localhost:8086/debug/pprof/trace" \
  --header "Authorization: Bearer INFLUX_TOKEN"
```

#### Responses

200 [Trace file](https://pkg.go.dev/runtime/trace) compatible with the [Golang `trace` command](https://pkg.go.dev/cmd/trace).

default Non 2XX error response from server.

`code` required string

code is the machine-readable error code.

Allowed: `internal error` , `not implemented` , `not found` , `conflict` , `invalid` , `unprocessable entity` , `empty value` , `unavailable` , `forbidden` , `too many requests` , `unauthorized` , `method not allowed` , `request too large` , `unsupported media type`

`err` string

Stack of errors that occurred during processing of the request. Useful for debugging.

`message` string

Human-readable message.

`op` string

Describes the logical code operation when the error occurred. Useful for debugging.
