Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在使用 Ruby on Rails、Heroku 和 Postgresql 时遇到以下错误:
PG::Error(致命:角色“********”的连接太多
我已经重新启动了几次服务器,但无济于事。有任何想法吗?
向 Heroku 支付更多的钱并不总是答案。
当我遇到开发级数据库的行限制时,我暂时遇到了这个问题。使用控制台删除行直到我低于限制解决了这个问题。
如果您使用的是独角兽,您可能会遇到这种情况的另一种潜在方式。使用的连接数是 dyno 的数量乘以每个 dyno 的独角兽工人的数量。Heroku在这里解释了这一切,以及配置它的方法config/unicorn.rb。
config/unicorn.rb
此外,查看正在使用的连接数可能很有用。跑吧heroku pg:info。
heroku pg:info
显然我在开发级数据库上。我升级到起重机级生产数据库,一切都应该没问题。