我最近把Phoenix升级到了最新的版本(1.7.7),Ecto也升级到了3.10.3。在升级之前,连接Heroku pg的时候,我只设置了SSL: true
,连接就可以了:
config :abc, abc.Repo,
url: System.get_env("DATABASE_URL"),
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"),
ssl: true
字符串
升级后,它失败并显示以下消息:
[error] Postgrex.Protocol (#PID<0.2449.0>) failed to connect: ** (DBConnection.ConnectionError) ssl connect: Options (or their values) can not be combined: [{verify,verify_peer},
{cacerts,undefined}] - {:options, :incompatible, [verify: :verify_peer, cacerts: :undefined]}
型
现在似乎需要更多的选项。有很多选项,我找不到一些关于如何设置它们的例子。顺便说一下,Heroku pg强制设置SSL选项,所以我不能删除它。有人遇到同样的问题吗?
1条答案
按热度按时间ogsagwnx1#
解决方案在这里找到:
https://elixirforum.com/t/how-to-set-ssl-options-correctly-when-connecting-to-heroku-postgres-db/59426/2
字符串