Fixes

/claim #7743

Summary

The nginx TCP proxy that fronts publicly exposed databases uses the default proxy_timeout of 10 minutes, which drops idle connections and kills long-running queries (like large SELECT * exports). This PR adds a configurable “Proxy Timeout” field to all 8 database types so users can control how long an idle connection is kept alive.

How it works:

  • New public_port_timeout column (integer, default 0) added to all 9 database tables (8 standalone + service_databases)
  • 0 means “no timeout” – internally mapped to 1 year (31,536,000 seconds) via proxy_timeout and proxy_connect_timeout in the nginx stream config
  • Any positive value is used directly as the timeout in seconds
  • The field appears in the Proxy section of each database’s General settings page
  • To apply a changed timeout, users toggle the proxy off and on (consistent with how the existing public port field works)

Changes

Backend:

  • app/Actions/Database/StartDatabaseProxy.php – added proxy_timeout and proxy_connect_timeout directives to the nginx stream config, with a resolveProxyTimeout() helper
  • All 8 Livewire General components updated with $publicPortTimeout property, validation rules, and syncData mapping
  • Migration adds public_port_timeout to all database tables

Frontend:

  • All 8 Blade templates updated with a “Proxy Timeout (seconds)” input field in the Proxy section

Tests:

  • Unit tests for resolveProxyTimeout covering zero, null, and positive values

Test plan

  • Create a Postgres (or any) database and expose it publicly
  • Verify the new “Proxy Timeout (seconds)” field appears in the Proxy section
  • Leave it at 0 and enable the proxy – confirm the generated nginx.conf uses proxy_timeout 31536000s
  • Set it to 1800 (30 min), toggle proxy off/on – confirm the nginx.conf uses proxy_timeout 1800s
  • Run a long query (or hold an idle connection) past 10 minutes – confirm the connection stays open

Claim

Total prize pool $100
Total paid $0
Status Pending
Submitted February 14, 2026
Last updated February 14, 2026

Contributors

NE

Nenad Ilic

@nenadilic84

100%

Sponsors

ZA

Zach Latta

@zachlatta

$100