Phoenix.PubSub in an umbrella app -- Phoenix in Action 1.4

What was involved in that? It shouldn’t have needed any “squelching”…

In particular, did you change anything in mix.exs like applications? That list is maintained automatically nowadays, but you’ll still see a lot of old advice to fiddle with it and it can flat-out break your app if misconfigured.

This error is coming from PG2Worker, which is trying to connect to a pg process in pg_join:

The message suggests that the application supervisor for phoenix_pubsub didn’t start correctly, since that’s what makes the pg process:

On the other hand, this error suggests that running the app in apps/auction isn’t loading Phoenix at all. :thinking:

A general tip: having separate PubSub instances is explicitly against the design goal of the Phoenix pubsub system. The idea is that code in the “not-web” application can’t explicitly call code in the “web” application (because the dependencies don’t point that way), but it can push messages into pubsub that are handled by the “web” application.

1 Like