I have a Postgres DB with whitelisted IP of 0.0.0.0. Render updates it to 0.0.0.0/32 when I save it. The little utility to test says it works. But when I start my app it says the SSL connection was terminated unexpectedly.
I wrote a basic script to test the connection in ruby.
require ‘pg’
Replace the placeholders with your actual database credentials
url = “postgresql://username:password@hostname:port/database”
begin
conn = PG.connect(url)
puts “Connected to PostgreSQL database”
You can now use the ‘conn’ object to interact with the database
rescue PG::Error => e
puts “Error connecting to the database: #{e.message}”
ensure
conn.close if conn
end
This also fails with this message
Error connecting to the database: connection to server at “35.227.164.209”, port 5432 failed: SSL connection has been closed unexpectedly
ruby(38904,0x1def65300) malloc: double free for ptr 0x143808200
ruby(38904,0x1def65300) malloc: *** set a breakpoint in malloc_error_break to debug
Thanks for any help.