Odoo instance database sessions
hodiploy_list_postgres_sessionsThe PostgreSQL sessions of an instance, live: for each, pid, application, client address, state (active, idle, "idle in transaction"), transaction age and idle time in seconds, wait event, blocked_by (pids it waits for), blocking (how many wait for it), waiting_for (e.g. "row (0,1) of ir_sequence"), holding (tables it holds locks on) and the start of its query; plus a summary and max_connections. Use it on lock errors ("could not obtain lock", "canceling statement due to lock timeout"), timeouts or a saturated database: sessions idle in a transaction that block others are usually the cause. Works even when the connections are exhausted.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"instance_id": "<instance_id>"
},
"name": "hodiploy_list_postgres_sessions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Sessions returned, oldest transaction first. The summary always counts them all. | |
| service_id | No | Hodiploy service id from hodiploy_list_instances. Optional when the user has a single Hodiploy service. | |
| instance_id | Yes | Instance id from hodiploy_list_instances. |