---
title: Java agent async instrumentation settings
source: https://docs.newrelic.com/docs/apm/agents/java-agent/configuration/java-agent-configuration-async-instrumentation-settings
---

Async instrumentation settings control how the agent tracks asynchronous activity in your application.

> #### 💡 TIP
>
> Back to the full settings index: [Java agent configuration](https://docs.newrelic.com/docs/apm/agents/java-agent/configuration/java-agent-configuration-config-file)

## Async instrumentation [#async_config]

These options are set directly in the `common` section and can be [overridden](#System_Properties) by using a prefixed system property.

**token_timeout**

| Type              | Integer |
| ----------------- | ------- |
| Default (seconds) | `180`   |

The number of seconds after which the agent will automatically expire an async token that has not been explicitly expired with `token.expire()`. For usage instructions, see [Tokens: Connect async threads](https://docs.newrelic.com/docs/agents/java-agent/java-agent-api/java-agent-api-asynchronous-applications#tokens).

> #### ⚠️ IMPORTANT
>
> Increasing this value may impact performance, because it increases the amount of memory the agent uses and prevents transactions from being reported due to unexpired tokens.

**segment_timeout**

| Type              | Integer |
| ----------------- | ------- |
| Default (seconds) | `600`   |

The number of seconds after which the agent will automatically end a segment that has not been explicitly ended with `segment.end()` or `segment.ignore()`. For usage instructions, see [Segments: Time arbitrary async activity](https://docs.newrelic.com/docs/agents/java-agent/java-agent-api/java-agent-api-asynchronous-applications#segments).

> #### ⚠️ IMPORTANT
>
> Increasing this value may impact performance, because it increases the amount of memory the agent uses and prevents transactions from being reported due to un-ended segments.
