Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!

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

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?

Comments

  • 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

  • Below command may be useful to set the time interval to 10 mins

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

  • Yes, I used something along those lines to get it working. 
  • 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
  • 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

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.