Skip to main content

How can I get my connection to Vertica to stay alive?

  • March 25, 2014
  • 5 replies
  • 25 views

Nicholas_Chamma_1
Forum|alt.badge.img
I am connecting to Vertica via DBeaver. After some idle time -- around 20 minutes -- any open connection to Vertica I had from DBeaver needs to re-established.

Is there a JDBC option I can specify to keep my connection to Vertica alive?

I took a look here, and there doesn't seem to be anything relevant. PostgreSQL, for example, offers a tcpKeepAlive option. I'm looking for something similar for Vertica.

Should that option also work for Vertica?

5 replies

pviennea
Forum|alt.badge.img
  • Participating Frequently
  • March 25, 2014
The timeout out period for Vertica and/or the JDBC driver does not get set at the database level.

However, it is advisable to keep the TCP Keep Alive settings at the OS level lower than the timeout parameter at the client level or at firewall to avoid such connection timeouts.

Please check with your network admin for firewall timeout value, or any timeout value set at the client level. Then modify kernel parameter tcp_keepalive_time to a value lower than the firewall timeout values. This should give the TCP keepalive a chance to keep the connection alive.

Here is a forum post that may help as well: http://vertica-forums.com/viewtopic.php?t=252

Thanks,

Pat


Prasanta_Pal
Forum|alt.badge.img
  • Participating Frequently
  • March 27, 2014
Below command may be useful to set the time interval to 10 mins

# echo 600 > /proc/sys/net/ipv4/tcp_keepalive_time


Nicholas_Chamma_1
Forum|alt.badge.img
  • Author
  • Participating Frequently
  • March 27, 2014
Yes, I used something along those lines to get it working.

Sarkunan_Hari
  • New Participant
  • February 25, 2015
Hi Nicholas, 
I am also facing same issue, can you please explain that, what are the steps u follow to solve this issue.

Thanks,
Guna

Forum|alt.badge.img+2
  • Participating Frequently
  • February 26, 2015

Hey Guna,

 

Take a look at my response to this post. It goes over the commands you can use to check your current settings as well as to set new values for your keepalive settings:

 

https://community.dev.hp.com/t5/Vertica-Forum/how-to-set-connection-to-vertica-keep-alive/m-p/222903#M8707

 

Let me know if you have any questions.

- Mitch