> For the complete documentation index, see [llms.txt](https://docs.tonic.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tonic.ai/textual/textual-install-administer/configuring-textual/general-instance-and-processing-settings/inactivity-timeout-max-session-length.md).

# Setting an inactivity timeout and maximum session length

By default, Textual does not have an automatic timeout based on user inactivity or overall session length.

## Setting a timeout based on user inactivity

To have a session time out based on user inactivity, set the following environment variable:

`SOLAR_INACTIVITY_TIMEOUT_IN_SECONDS`

For example, if you set this to `60`, then after a session is inactive for 60 seconds, the session ends.

## Setting an overall maximum length for a user session

To automatically end a user session when it reaches a maximum length, set the following environment variable:

`SOLAR_MAXIMUM_SESSION_LENGTH_IN_HOURS`

For example, if you set this to `3`, then when the session length reaches 3 hours, the session automatically ends and the user must reauthenticate.l


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.tonic.ai/textual/textual-install-administer/configuring-textual/general-instance-and-processing-settings/inactivity-timeout-max-session-length.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
