> For the complete documentation index, see [llms.txt](https://docs.datasentinel.io/manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.datasentinel.io/manual/ai-connector/analyze-and-tune-workloads/diagnose-live-spike.md).

# Diagnose a live performance spike

Run a real-time analysis to find what is slowing an instance down right now.

When an instance slows down in the moment, ask for a real-time (Live360) analysis to find what is happening and why.

Real-time analyses rely on the [Live360](https://app.gitbook.com/o/DaDQkGCM7r2TghFSBFLQ/s/yE16Xb3IemPxJWydtPOj/features/key-features/live360) module, the only part of the platform that connects directly to the PostgreSQL instance instead of reading from the repository. Access to it is a flag set on each user profile, under [Users & Roles](https://app.gitbook.com/o/DaDQkGCM7r2TghFSBFLQ/s/yE16Xb3IemPxJWydtPOj/implementation/platform-usage/configuration/users-and-roles#live360-access). Without that flag, the assistant does not offer real-time analyses and redirects you to the closest historical one.

**Example prompts:**

* **Real-time snapshot:**
  * "What's happening right now on prod-eu-2?"
  * "Show me the live sessions on prod-eu-1."
  * "Is a vacuum or index build running on prod-eu-1 right now, and how far along?"
* **Diagnose a slowdown:**
  * "prod-eu-1 feels slow, find out what's wrong."
  * "Users get 'too many connections' errors on prod-eu-1: diagnose it."
  * "Is the server hosting prod-eu-1 CPU-bound?"

## Security

Opening a live analysis to the assistant never opens your database to it. Every real-time analysis transits through the platform and runs only a few **read-only** queries via the Datasentinel [agent](https://app.gitbook.com/o/DaDQkGCM7r2TghFSBFLQ/s/yE16Xb3IemPxJWydtPOj/getting-started/installation/agent) and the Datasentinel [collection user](https://app.gitbook.com/o/DaDQkGCM7r2TghFSBFLQ/s/yE16Xb3IemPxJWydtPOj/getting-started/postgresql-clusters/monitoring-user). No modification is ever made on the PostgreSQL cluster, and no PostgreSQL credential is ever known to the AI assistant.

{% @arcade/embed url="<https://app.arcade.software/share/fKxUaboeIuCI5JCmfZGi>" flowId="fKxUaboeIuCI5JCmfZGi" %}

*This walkthrough was recorded with the ChatGPT Desktop app.*

{% hint style="info" %}
**Continue from the menu.** A live snapshot ends with a short menu of next steps tied to what it found: untangle the blocking chain, fetch the execution plan of the query hogging the sessions, check whether the host itself is the limit, or switch to the historical analysis of the same window once the spike is over. Pick an option to keep the investigation going without retyping the context.
{% endhint %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.datasentinel.io/manual/ai-connector/analyze-and-tune-workloads/diagnose-live-spike.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
