与此问题类似,我询问如何删除rails应用中的实时记录,如何在凤凰城How to delete a record from production in Rails中执行此操作
我尝试了heroku run iex -S mix phx.server
,但我收到了以下错误:
Simons-MBP:iotc Simon$ heroku run iex -S mix phx.server
Running iex -S mix phx.server on ⬢ icingonthecake... up, run.3732 (Free)
Erlang/OTP 19 [erts-8.3] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [hipe] [kernel-poll:false]
14:29:43.723 [info] Running Iotc.Web.Endpoint with Cowboy using http://:::54253
14:29:43.734 [error] Postgrex.Protocol (#PID<0.276.0>) failed to connect: ** (Postgrex.Error) FATAL 53300 (too_many_connections): too many connections for role "onktihhpdhhwlp"
14:29:43.734 [error] Postgrex.Protocol (#PID<0.282.0>) failed to connect: ** (Postgrex.Error) FATAL 53300 (too_many_connections): too many connections for role "onktihhpdhhwlp"
14:29:43.734 [error] Postgrex.Protocol (#PID<0.287.0>) failed to connect: ** (Postgrex.Error) FATAL 53300 (too_many_connections): too many connections for role "onktihhpdhhwlp"
14:29:43.734 [error] Postgrex.Protocol (#PID<0.281.0>) failed to connect: ** (Postgrex.Error) FATAL 53300 (too_many_connections): too many connections for role "onktihhpdhhwlp"
14:29:43.734 [error] Postgrex.Protocol (#PID<0.284.0>) failed to connect: ** (Postgrex.Error) FATAL 53300 (too_many_connections): too many connections for role "onktihhpdhhwlp"
14:29:43.734 [error] Postgrex.Protocol (#PID<0.279.0>) failed to connect: ** (Postgrex.Error) FATAL 53300 (too_many_connections): too many connections for role "onktihhpdhhwlp"
14:29:43.734 [error] Postgrex.Protocol (#PID<0.286.0>) failed to connect: ** (Postgrex.Error) FATAL 53300 (too_many_connections): too many connections for role "onktihhpdhhwlp"
答案 0 :(得分:0)
这很可能是pool_size
文件中的apps/<yourapp>/config/*.exs
问题 - 如果您正在使用Phoenix 1.3(不确定配置在1.2或以下的位置)。我已经在我的本地机器上设置为60,如果我已经运行了控制台,我甚至无法执行任何混音任务。我把pool_size
放到了10,很好。
参考:https://github.com/elixir-ecto/postgrex/issues/210#issuecomment-239941678