Opening the Monitor
Access Monitoring
Click the connection context menu → Monitor, or click the monitoring button in the sidebar.
Monitoring is available for PostgreSQL, MySQL, MariaDB, MongoDB, Redis, and SQL Server. SQLite and DuckDB are embedded databases without active processes.
Process List
Process Table Columns
The process list displays the following information:| Column | Description |
|---|---|
| ID | Process or connection ID (unique identifier) |
| User | Database user running the query |
| Database | Active database for the connection |
| Command | Query type (SELECT, INSERT, UPDATE, etc.) |
| Time | How long the query has been running (seconds) |
| State | Current state (active, idle, waiting, etc.) |
| Query | The SQL query being executed (truncated to 100 characters) |
| Actions | Kill process button |
Color-Coded Time
Query execution time is color-coded for quick identification:- White/Default: Less than 1 minute
- Amber: 1-5 minutes (potentially slow query)
- Red: Over 5 minutes (long-running query, potential issue)
Sorting Processes
Click column headers to sort the process list:- Sort by Time: Identify long-running queries
- Sort by User: Group queries by user
- Sort by Database: Filter processes by database
Auto-Refresh
Enable Auto-Refresh to monitor processes in real-time:Auto-Refresh pauses when you switch to a different tab to reduce server load. It resumes when you return to the monitoring tab.
Server Status
The status bar displays server health metrics:PostgreSQL Metrics
- Active Connections: Current number of client connections
- Max Connections: Maximum allowed connections (from
max_connectionssetting) - Connection Usage: Visual indicator (e.g., “45/100” with progress bar)
MySQL/MariaDB Metrics
- Threads Connected: Current active connections
- Max Connections: Maximum allowed connections
- Uptime: Server uptime
- Questions: Total queries executed since startup
MongoDB Metrics
- Current Connections: Active client connections
- Available Connections: Remaining connection slots
- Uptime: Server uptime
Redis Metrics
- Connected Clients: Active client connections
- Max Clients: Maximum allowed clients
- Used Memory: Current memory usage
- Uptime: Server uptime
Server status metrics appear in the status bar at the bottom of the monitoring tab.
Killing Processes
Kill a Single Process
Review Details
A confirmation dialog shows process ID, user, database, and the query being executed.
Force Terminate (PostgreSQL)
For PostgreSQL, choose between gentle cancellation and forced termination:- Cancel (Default)
- Force Terminate
Uses
pg_cancel_backend() to gracefully cancel the current query. The connection remains open.Use when: You want to stop a long-running query but keep the connection alive.Common Kill Scenarios
Long-Running Query Blocking Others
Long-Running Query Blocking Others
Identify the query with the highest Time value (red highlight). Kill it to unblock waiting processes.
Idle Transaction Holding Locks
Idle Transaction Holding Locks
Look for processes with state “idle in transaction” that have been running for a long time. Kill to release locks.
Accidental Full Table Scan
Accidental Full Table Scan
If you accidentally ran
SELECT * FROM huge_table without a LIMIT, kill the process to stop it.Runaway Application Connection
Runaway Application Connection
Identify connections from misbehaving applications (check User and Database) and kill them.
Troubleshooting
No Processes Shown
No Processes Shown
- Ensure you’re connected to the database
- Check that the database user has permission to view processes:
- PostgreSQL:
SELECT pg_stat_activityrequirespg_monitorrole - MySQL: Requires
PROCESSprivilege - MongoDB: Requires
inprogcommand access
- PostgreSQL:
Permission Denied When Killing
Permission Denied When Killing
- Ensure the database user has permission to kill processes:
- PostgreSQL: Can only kill your own processes unless you have
pg_signal_backendrole - MySQL: Requires
SUPERprivilege to kill other users’ processes - MongoDB: Requires
killopprivilege
- PostgreSQL: Can only kill your own processes unless you have
Process List Not Refreshing
Process List Not Refreshing
- Check Auto-Refresh is enabled
- Verify the database connection is still active
- Click Refresh manually to test
Query Column Truncated
Query Column Truncated
- Queries are truncated to 100 characters in the table
- Click on the row to view the full query in the right panel
- For very long queries, copy from the kill confirmation dialog
Privacy Mode
When Privacy Mode is enabled:- User column is blurred
- Database column is blurred
- Query column is blurred
Shift+Cmd+P.
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Cmd+R | Refresh process list |
Shift+Cmd+P | Toggle Privacy Mode |
Database-Specific Notes
PostgreSQL
- Process list fetched from
pg_stat_activityview - Can kill processes with
pg_cancel_backend()orpg_terminate_backend() - Shows queries from all databases on the server
MySQL/MariaDB
- Process list fetched from
SHOW FULL PROCESSLIST - Killed with
KILL <id>command - Requires
PROCESSprivilege to view all processes
MongoDB
- Process list fetched from
db.currentOp()command - Killed with
db.killOp()command - Shows operations on the current database
Redis
- Process list fetched from
CLIENT LISTcommand - Killed with
CLIENT KILLcommand - Shows all connected clients
SQL Server
- Process list fetched from
sys.dm_exec_requestsandsys.dm_exec_sessionsviews - Killed with
KILL <session_id>command - Requires
VIEW SERVER STATEpermission
Use Cases
Diagnosing Slow Application Performance
Diagnosing Slow Application Performance
Open the Monitor to identify slow queries causing application lag. Sort by Time to find queries running for minutes.
Tracking Connection Leaks
Tracking Connection Leaks
Monitor active connections over time. If connections grow without being released, your application may have a connection leak.
Emergency Query Termination
Emergency Query Termination
If a deployed migration script is running forever, use the Monitor to kill it before it locks the database.
Capacity Planning
Capacity Planning
Check Active Connections vs Max Connections to determine if you need to increase connection limits.
Best Practices
Monitor During Deployments
Monitor During Deployments
Keep the Monitor open during deployments to watch for long-running migrations or unexpected queries.
Set Connection Alerts
Set Connection Alerts
If active connections consistently approach max connections, consider:
- Increasing
max_connections - Using connection pooling (PgBouncer, ProxySQL)
- Investigating application connection leaks
Document Long-Running Queries
Document Long-Running Queries
If you frequently see the same slow query, document it and optimize with indexes or query rewrites.
Use Auto-Refresh for Live Monitoring
Use Auto-Refresh for Live Monitoring
Enable Auto-Refresh when troubleshooting live issues. Disable it during normal development to reduce server load.