posthog
posthog copied to clipboard
chore(data-warehouse): Added a timeout for postgres connections
Problem
- If a users postgres doesn't allow our IP addresses, then the SQL connection to check for schemas just hangs until after the the 60sec request timeout, returning a 5xx error to the user with a very unhelpful error message
Changes
- Reduce the connection timeout to 5secs
- Add a friendly error message for when the timeout occurs
Does this work well for both Cloud and self-hosted?
- Yes
How did you test this code?
- Via browser clicky clicks