travisf

travisf

Can't start application locally - failed to start child: Oban

I have an application which has always worked fine locally, and works well in production but today I’ve been trying to start it iex -S mix phx.server and I get this error message:

GenServer {Oban.Registry, {Oban, {:plugin, Oban.Plugins.Cron}}} terminating
** (DBConnection.ConnectionError) connection not available and request was dropped from queue after 2964ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by:

  1. Ensuring your database is available and that you can connect to it
  2. Tracking down slow queries and making sure they are running fast enough
  3. Increasing the pool_size (although this increases resource consumption)
  4. Allowing requests to wait longer by increasing :queue_target and :queue_interval

See DBConnection.start_link/2 for more information
...

Application scrivener exited: :stopped
** (Mix) Could not start application myapp_data: MyApp.Application.start(:normal, []) returned an error: shutdown: failed to start child: Oban
    ** (EXIT) shutdown: failed to start child: "accounting"
        ** (EXIT) shutdown: failed to start child: Oban.Queue.Producer
            ** (EXIT) exited in: GenServer.call(#PID<0.1122.0>, {:listen, [:insert, :signal]}, 5000)
                ** (EXIT) time out

I’m on the main branch, no changes. I don’t have any other beam instances running and just to be sure I ran killall -9 beam.smp. I’ve removed _build no luck.

I’ve had similar issues in the past but never this persistent and generally one of the above solves the issue.

Most Liked

sodapopcan

sodapopcan

lol, ya I’m having a bit of a day today and spending a lot of time on this forum.

I’m not sure as I don’t really have experience with Oban. Just reading the error, though, is/was there something shovelling a crapton of jobs onto the queue and it can’t handle it? Maybe try truncating the queue table? Otherwise, sorry for the noise, I’m not really sure :frowning:

sorentwo

sorentwo

Oban Core Team

Something is monopolizing all of your db connections and Oban isn’t able to make the necessary requests on startup. Cron only runs at the top of every minute, so it’s odd that it would affect booting.

You could try increasing the pool size, or don’t start Oban on application boot temporarily and see if the system can normalize.

That’s doubtful. Inserting jobs happens from application processes, not Oban’s, and an exception while fetching jobs would be from a Producer rather than Cron.

travisf

travisf

Apologies everyone it appears my dev.secrets.exs file had the wrong DB creds and was trying to connect to the production DB rather than my local instance! Thanks @sodapopcan and @sorentwo for your quick responses.

Where Next?

Popular in Questions Top

_russellb
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
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lists...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
script
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
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New

Other popular topics Top

malloryerik
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode. The solution seems to be, in a hyphena...
New
Harrisonl
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
ovidiubadita
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
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" =&gt; #BSON.ObjectId&lt;58eb1a7a9ad169198c3dXXXX&gt;, "email" =&gt; ...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement