fix: remove duplicate sync_connect from Phoenix.PubSub.Redis config (#198)
Phoenix.PubSub.Redis 3.1.0 automatically appends sync_connect: true to the
redis_opts before passing to Redix.PubSub.start_link. Our configuration was
also passing sync_connect: false, creating a duplicate key that NimbleOptions
rejected with a confusing error message.
The error showed:
NimbleOptions.ValidationError: unknown options [:sync_connect],
valid options are: [..., :sync_connect, ...]
This happened because sync_connect appeared twice in the keyword list,
and NimbleOptions rejects duplicate keys.
The fix removes our sync_connect option entirely, letting phoenix_pubsub_redis
control the sync_connect behavior.
This completes the phoenix_pubsub_redis 3.1.0 migration started in cd660387.
Fixes production pod crash on startup.
Reviewed-on: graham/towerops-web#198
This commit is contained in:
parent
cd6603873a
commit
bf30d9ec7e
2 changed files with 12 additions and 3 deletions
|
|
@ -1,3 +1,13 @@
|
|||
2026-03-27
|
||||
fix: remove duplicate sync_connect option from Phoenix.PubSub.Redis configuration
|
||||
- Phoenix.PubSub.Redis 3.1.0 automatically appends sync_connect: true to redis_opts
|
||||
- Our configuration also passed sync_connect: false, creating a duplicate key
|
||||
- NimbleOptions rejects duplicate keys, causing ValidationError crash on startup
|
||||
- Removed sync_connect from our config - let phoenix_pubsub_redis control it
|
||||
- Fixes production pod crash: "unknown options [:sync_connect], valid options are: [...]"
|
||||
- This completes the phoenix_pubsub_redis 3.1.0 migration started in previous commit
|
||||
Files: lib/towerops/application.ex (redis_pubsub_config/0)
|
||||
|
||||
2026-03-27
|
||||
fix: update Phoenix.PubSub.Redis configuration for 3.1.0 compatibility
|
||||
- Fixed NimbleOptions.ValidationError crash on production pod startup
|
||||
|
|
|
|||
|
|
@ -257,9 +257,8 @@ defmodule Towerops.Application do
|
|||
backoff_initial: 500,
|
||||
backoff_max: 30_000,
|
||||
# Don't exit process on disconnection - let PubSub handle it
|
||||
exit_on_disconnection: false,
|
||||
# Sync connect to fail fast if Redis unavailable at startup
|
||||
sync_connect: false
|
||||
exit_on_disconnection: false
|
||||
# Note: sync_connect is automatically set to true by phoenix_pubsub_redis 3.1.0
|
||||
]
|
||||
|
||||
# Add password if configured (read from application config set by runtime.exs)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue