Every other postgres query fails with "connection failed" or "Connection was established but closed as invalid"

Answered

Hello there,

Setup:
DataGrip 2022.2.4
PostgreSQL Driver: 42.5.0
PostgreSQL Server: Stackgres Operated Server (v14.1) in a k8s Cluster connected via wireguard VPN

Problem:
Though we can connect to the Database(s) and the first `select` is working, every other fails with either "connection failed" or "connection was established but closed as invalid" (depending on the DataGrip Version).

No other client (pgadmin or any VSCode Plugin) faces this issue, neither our applications have problems. So I assume there's some misconfiguration on the DataGrip side.

Workaround:
With a little effort we at least managed to workaround this issue. When running a "Diagnostic Refresh" and set Trx to "Repeatable Read" it works reliably until the next restart of the DataGrip IDE.

Expectation:
We would very much appreciate if every query runs through out of the box without any clickwork when starting up the IDE. Maybe there's a setting we missed to configure. 

3
1 comment

Hello Patrick,

Please reproduce the issue, collect the IDE logs (Help | Collect Logs and Diagnostic Data), upload them to https://uploads.jetbrains.com/ and provide its ID.

0

Please sign in to leave a comment.