wvanbergen / node-vertica

Pure javascript Vertica database client. Except it is written in CoffeeScript.
MIT License
44 stars 30 forks source link

Add TCP KeepAlive connection config option #60

Closed caoxu2000 closed 7 years ago

caoxu2000 commented 7 years ago

This fixes #59. We experienced a stale connection issue in a multi-node cluster environment when our Vertica server went down for maintenance and came back up. One node did not re-connect properly to Vertica once it came online again. We verified enabling tcp keepAlive fixes this issue. The keepAlive option is set to false by default just like the node postgres module. You can set it to true in your app's config like so:

vertica.connect({ keepAlive: true } ...

gregjopa commented 7 years ago

@caoxu2000 Nice work!

The CI failure seems to be unrelated to this PR. Node versions 0.8 and 0.10 are really old and are no longer supported. I think we should remove them from the travis config.