2017-06-16 95 views
0

与此类似的问题,我问及如何在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" 
+1

这听起来像是你打一些Heroku的数据库连接限制。 Phoenix创建一个连接池,你可能也运行该应用程序。 – Dogbert

回答

0

这是最有可能在apps/<yourapp>/config/*.exs文件pool_size问题 - 如果你正在使用凤凰1.3是(不知道在哪里的CONFIGS都在1.2以下)。我在本地机器上设置为60,如果我已经有一个控制台运行,我甚至无法执行任何混合任务。我把我的pool_size降到10,并没有问题。

参考:https://github.com/elixir-ecto/postgrex/issues/210#issuecomment-239941678