I have a Phoenix project running on Docker Swarm using AWS spot machines and I’m getting this error when the service tries to start
(ErlangError) Erlang error: {:timeout, {:gen_server, :call, [#PID<0.7078.0>, {:checkout, #Reference<0.180397287.2702180353.191007>, true, 5000}, 5000]}}
This error sometimes happens, sometimes not, I didn’t figure out the pattern which triggers the error. Have you guys ever got this error?
I’m using Elixir 1.7.4 and Erlang 21
bash-4.4$ /opt/app/releases/1.0.0/content_proxy.sh remote_console
Erlang/OTP 21 [erts-10.1.1] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe]
Interactive Elixir (1.7.4) - press Ctrl+C to exit (type h() ENTER for help)
iex(content_proxy@127.0.0.1)1>
My O.S is Alpine Linux 3.8.4
My Application module only connect into MongoDB database
defmodule ContentProxy.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
# List all child processes to be supervised
database_config = Application.get_env(:content_proxy, :db_config)
children = [
ContentProxyWeb.Endpoint,
%{
id: Mongo,
start: { Mongo, :start_link, [database_config] }
}
]
{:ok, _} = Logger.add_backend(Sentry.LoggerBackend)
opts = [strategy: :one_for_one, name: ContentProxy.Supervisor]
Supervisor.start_link(children, opts)
end
# Tell Phoenix to update the endpoint configuration
# whenever the application is updated.
def config_change(changed, _new, removed) do
ContentProxyWeb.Endpoint.config_change(changed, removed)
:ok
end
end