Hello everyone, Im getting this error when configuring Oban on my phoenix App, Pls I need your expertise on this
Im using Oban 2.19
The error is coming from oban_met, the oban version shouldn’t matter here.
[error] GenServer {Oban.Registry, {Oban, Oban.Met.Reporter}} terminating ** (Postgrex.Error) ERROR 42601 (syntax_error) syntax error at or near “false”
Which version of Postgres are you using? It looks like creating the estimate function is failing, most likely due to an incompatible Postgres version.
You can try creating it manually (Oban.Met — Oban Met v1.0.3), or disable it entirely by setting auto_migrate: false for the reporter without running the migration at all.
Thanks sorentwo, I really appreciate. I was able to resolved the issue by changing my engine from Oban.Engines.Lite to Oban.Engines.Basic
in my configuration settings…
The one tha was throwing error
config :restaurant_api, Oban,
repo: RestaurantApi.Repo,
engine: Oban.Engines.Lite,
plugins: [
Oban.Plugins.Pruner,
# Oban.Plugins.Cron
],
queues: [
default: 10,
mailers: 20
]
The one that is working.
config :restaurant_api, Oban,
repo: RestaurantApi.Repo,
engine: Oban.Engines.Basic,
plugins: [
Oban.Plugins.Pruner,
# Oban.Plugins.Cron
],
queues: [
default: 10,
mailers: 20
]
Since I added OSS Oban Web I have been seeing this error. tried updating the engine as well but to no avail
any solution ? Below is my oban config and error from logs
config :maverick, Oban,
repo: Maverick.Repo,
prefix: "oban",
engine: Oban.Engines.Basic,
queues: [default: 10, maverick: 10, goose: 10, wolfman: 10],
notifier: Oban.Notifiers.PG,
# insert_trigger: false,
shutdown_grace_period: :timer.seconds(60),
plugins: [
{Oban.Plugins.Pruner, max_age: 60 * 60 * 24 * 7},
{Oban.Plugins.Lifeline, rescue_after: :timer.minutes(30)},
{Oban.Plugins.Reindexer, schedule: "@weekly"},
{Oban.Plugins.Cron,
crontab: [
# {"* * * * *", Maverick.Workers.KeepAliveWorker}
{"30 * * * *", Maverick.Workers.CarboniteOutboxWorker, args: %{outbox: "maverick_outbox"}},
{"0 5 * * *", Maverick.Workers.CarbonitePurgeWorker},
{"30 1 * * *", Maverick.Workers.OwnTracksPurgeWorker}
],
timezone: "Etc/UTC"}
]
GenServer {Oban.Registry, {Oban, Oban.Met.Reporter}} terminating\n** (Postgrex.Error) ERROR 42601 (syntax_error) syntax error at or near \".\"\n\n query: SELECT f1.\"value\", f0.\"value\", identifier('oban').oban_count_estimate(f1.\"value\", f0.\"value\") FROM json_array_elements_text($1) AS f0 CROSS JOIN json_array_elements_text($2) AS f1\n (ecto_sql 3.12.1) lib/ecto/adapters/sql.ex:1096: Ecto.Adapters.SQL.raise_sql_call_error/1\n (ecto_sql 3.12.1) lib/ecto/adapters/sql.ex:994: Ecto.Adapters.SQL.execute/6\n (ecto 3.13.4) lib/ecto/repo/queryable.ex:241: Ecto.Repo.Queryable.execute/4\n (ecto 3.13.4) lib/ecto/repo/queryable.ex:19: Ecto.Repo.Queryable.all/3\n (oban_met 1.0.3) lib/oban/met/reporter.ex:182: anonymous fn/3 in Oban.Met.Reporter.checks/1\n (maverick 0.1.0) lib/maverick/repo.ex:2: anonymous fn/1 in Maverick.Repo.transaction/2\n (ecto 3.13.4) lib/ecto/repo/transaction.ex:11: anonymous fn/3 in Ecto.Repo.Transaction.transact/4\n (ecto_sql 3.12.1) lib/ecto/adapters/sql.ex:1400: anonymous fn/3 in Ecto.Adapters.SQL.checkout_or_transaction/4\nLast message: :checkpoint" pid=#PID<0.1983821.0> mfa=:gen_server.error_info/8
@darnahsan It looks like there is a syntax error from an outdated version of ecto_sql.
Be sure that you update both ecto and ecto_sql.
Thanks will update and check. Meanwhile seeinng this issue recently as well. Is this also related to outdated versions ?
To make it an easier update, here is a link to the docs:
To ensure it only happens once, disable the auto-migrations.























