Skip to content

Add configurable idle timeout for PostgreSQL targets#1565

Merged
Eugeny merged 1 commit intowarp-tech:mainfrom
SteezyCougar:configurable-psql-timoutes
Nov 5, 2025
Merged

Add configurable idle timeout for PostgreSQL targets#1565
Eugeny merged 1 commit intowarp-tech:mainfrom
SteezyCougar:configurable-psql-timoutes

Conversation

@SteezyCougar
Copy link
Copy Markdown
Contributor

Currently when web user approval is used with psql (And I assume other ways) if the user is inactive for a few minutes it will force them to login again. This hasn't been a great user experience for some of our users, and so this PR is to fix that issue, along with making the actual timeout configurable allowing administrators to control how long authenticated sessions can remain idle before being terminated. This addresses scenarios where long-lived connections may need to be managed more strictly.

Changes

  • Configuration: Added optional idle_timeout field to TargetPostgresOptions with default value of "10m"
  • TCP Keepalive: Enabled TCP keepalive on connections to prevent premature disconnections during web auth approval wait
  • Session Monitoring: Implemented idle timeout checking in the PostgreSQL session loop that tracks activity and closes connections exceeding the configured timeout
  • UI: Added idle timeout configuration field in the web admin interface for PostgreSQL targets
  • Error Handling: Invalid timeout values gracefully fall back to default (10 minutes) with warning logs

Backwards Compatibility

Should be fully backwards compatible!

@Eugeny
Copy link
Copy Markdown
Member

Eugeny commented Nov 5, 2025

Thank you!

@Eugeny Eugeny merged commit 2d88273 into warp-tech:main Nov 5, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants