-1

I have installed Postgres(11) on Azure, I am connecting to it using Datagrip client, The problem is it disconnects very frequently and connects back when I run some query, takes nearly 5 seconds to connect back. Here I am attaching a picture of AdvancedSettings which I have tried already but this doesn't seem to work, can you please suggest a solution so this stays connected for more than 10 mins at least.

bharat
  • 23
  • 4
  • Why don't you stay connected? – Laurenz Albe Mar 03 '20 at 07:44
  • I want to be connected all the time, but during my development, If I read some document or due to any reason if I stop using the DB Client for 5 mins it gets disconnected, when I run some query it starts connecting again, synchronizing, etc. – bharat Mar 03 '20 at 09:01

1 Answers1

0

The solution depends on who closes the connection.

  • If the connection is closed by the benighted Azure configuration, configure DataGrip so that it sends keepalive packets:

    On the Options tab, select the Run keep-alive query each N seconds checkbox, where N is a number of seconds after which DataGrip runs a keep-alive query again.

  • If the connection is closed by DataGrip, tell it not to do that:

    On the Options tab, deselect the Auto-disconnect after N seconds checkbox.

Laurenz Albe
  • 209,280
  • 17
  • 206
  • 263