Note that there are some explanatory texts on larger screens.

plurals
  1. POStrange error message when stopping app using lager and poolboy
    text
    copied!<p>I've created simple application using poolboy with almost empty worker, but when I stop application, I see the following error printed by lager:</p> <pre><code>10:50:26.363 [error] Supervisor {&lt;0.236.0&gt;,poolboy_sup} had child test_worker started with test_worker:start_link([]) at undefined exit with reason shutdown in context shutdown_error </code></pre> <p>What causes this error and how can I fix this?</p> <p>Supervisor:</p> <pre><code>-module(test_sup). -behaviour(supervisor). -export([start_link/0, init/1]). start_link() -&gt; supervisor:start_link({local, ?MODULE}, ?MODULE, []). init([]) -&gt; ChildSpecs = [pool_spec()], {ok, {{one_for_one, 1000, 3600}, ChildSpecs}}. pool_spec() -&gt; Name = test_pool, PoolArgs = [{name, {local, Name}}, {worker_module, test_worker}, {size, 10}, {max_overflow, 20}], poolboy:child_spec(Name, PoolArgs, []). </code></pre> <p>Worker:</p> <pre><code>-module(test_worker). -behaviour(gen_server). -behaviour(poolboy_worker). -export([start_link/1]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -record(state, {}). start_link([]) -&gt; gen_server:start_link(?MODULE, [], []). init([]) -&gt; {ok, #state{}}. handle_call(_Request, _From, State) -&gt; {reply, _Reply = ok, State}. handle_cast(_Msg, State) -&gt; {noreply, State}. handle_info(_Info, State) -&gt; {noreply, State}. terminate(_Reason, _State) -&gt; ok. code_change(_OldVsn, State, _Extra) -&gt; {ok, State}. </code></pre> <p>The rest of the application is pretty standard.</p> <p>Erlang: R16B02</p> <p>Poolboy: 1.0.1</p> <p>Lager: latest version from master at the time of writing the question (822062478a223313dce30e5a45e30a50a4b7dc4e)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload