Querying the Jobs Table

Oban.Job defines an Ecto schema and the jobs table can therefore be queried as usual, e.g.:

  from j in Oban.Job,
    where: j.worker == "MyApp.Business",
    where: j.state == "discarded"


Elixir and Erlang Versions

If your app crashes on launch, be sure to confirm you are running the correct version of Elixir and Erlang (view requirements). If using the hashnuke/elixir buildpack, you can update the elixir_buildpack.config file in your application's root directory to something like:

# Elixir version

# Erlang version

Available Erlang versions are available here.

Database Connections

Make sure that you have enough available database connections when running on Heroku. Oban uses a database connection in order to listen for pubsub notifications. This is in addition to your Ecto Repo pool_size setting.

Heroku's Hobby tier Postgres plans have a maximum of 20 connections, so if you're using one of those plan accordingly.

PG Bouncer

No Notifications with Transaction Pooling

Using PG Bouncer's "Transaction Pooling" setup disables all of PostgreSQL's LISTEN and NOTIFY activity. Some functionality, such as scaling queues, canceling jobs, etc. rely on those notifications.

To ensure full functionality you must use a Repo that connects directly to the database, or use another mode like "Session Pooling" if possible.