title: Amazon Redshift: Queries never finish running after period idle
body: <p>I am working on a new Amazon Redshift database that I recently started.
  I am experiencing an issue where after I connect to the database, I can run queries without any issue. However, if I spend some time without running anything (like, 5 minutes), when I try running another query or command, ir never finishes.</p>
  <p>I am using dBeaver Community 21.2.2 to interact with the connection, and it stays &quot;Executing query&quot; forever. The only way i can get it to work is by cancelling, disconnecting from the redshift, connecting again and then it executes correctly. Until I stop using for some minutes, and then it's happens all over again.</p>
  <p>I tought this was a dBeaver issue, as we have a Meabase connected to this same cluster without any issues. But today, I tried manipulating this cluster with R using RJDBC, and the same thing happens: I can run queries, until I stop, and then when I try running something else it never stops, until I disconnect and connect again.</p>
  <p>I'm sorry if I wasn't able to explain it clearly, I tried searching for simmilar issues but couldn't.</p>