cburman01
Poolboy max restarts
Hello,
Is it possible to set a max_restarts on the worker module in the poolboy child spec? It appears they use the default of three, but I want to be able to configure that number. I tried abstracting the connect pool into its own supervisor then set the max_restrats on that supervisor, but when I crash the pid it still restarts only three times max. Any advice?
defmodule PoolSupervisor do
use Supervisor
require Logger
def start_link do
# Supervisor.start_link(__MODULE__, nil, name: :config_server_supervisor)
Supervisor.start_link(__MODULE__, [], name: __MODULE__)
end
def init(_) do
connection_pool_config = [
{:name, {:local, :inventory}},
{:worker_module, ConnectionPoolWorker},
{:size, 2},
{:max_overflow, 1}
]
children = [
:poolboy.child_spec(:inventory, connection_pool_config, :inventory)
]
supervise(children, strategy: :one_for_one, max_restarts: 500, max_seconds: 1)
end
end
Popular in Questions
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service.
Currently when I de...
New
I am trying to figure out how Mix knows whether the environment is test, dev, or prod -- where is this set?
Thanks.
New
can someone please explain to me how Enum.reduce works with maps
New
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
I have followed this StackOverflow post to install the specific version of Erlang.
And When I am running mix ecto.setup then getting fol...
New
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this
"1000"
What is the ...
New
Could someone help me? I'm making my first elixir program, number guessing game. I can't figure out how to convert the user's guess from ...
New
Hi,
I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
Other popular topics
Hi everyone!
I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
Phoenix 1.4.0 released
Phoenix 1.4 is out! This release ships with exciting new features, most notably
with HTTP2 support, improved deve...
New
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
New
Hello all!
I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
I have followed this StackOverflow post to install the specific version of Erlang.
And When I am running mix ecto.setup then getting fol...
New
As a follow up to my earlier question:
I have the code compiling and running but not getting a successful login from the rest server. ...
New
Hey all,
I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum.
...
New







