Skip to content

Commit

Permalink
StorageLoader: added tcpKeepAlive=true to JDBC for long-running COPYs…
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderdean authored and chuwy committed Sep 5, 2017
1 parent c13ed20 commit b89ceac
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/snowplow-storage-loader/postgres_loader.rb
Expand Up @@ -178,6 +178,7 @@ def self.get_connection(target)
props.set_property :user, target[:username]
props.set_property :password, target[:password]
props.set_property :sslmode, target.fetch(:ssl_mode, "disable")
props.set_property :tcpKeepAlive, "true" # TODO: make this configurable if any adverse effects

# Used instead of Java::JavaSql::DriverManager.getConnection to prevent "no suitable driver found" error
org.postgresql.Driver.new.connect(connection_url, props)
Expand Down

0 comments on commit b89ceac

Please sign in to comment.