posthog icon indicating copy to clipboard operation
posthog copied to clipboard

chore(data-warehouse): Added a timeout for postgres connections

Open Gilbert09 opened this issue 1 year ago • 0 comments

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

Gilbert09 avatar May 20 '24 16:05 Gilbert09