Oban pg_notify statements failing due to large payload

These queries, which come from Oban’s internals, occasionally fail, due to payload being more than 8,000 bytes.

SELECT pg_notify($1, payload) FROM
    json_array_elements_text($2::json) AS payload

I understand that Oban uses Postgres pubsub as a means to communicate all sorts of information about queues and jobs. I’m not totally sure which channel has these large payloads, but I have noticed some pretty big payloads on the oban_gossip channel, where the payload seems to be queue information, and seems like it could grow quite large, so that’s my main suspicion.

My question, though, is about if it’s normal to have messages on the oban_gossip channel in the first place, because from what I understand, the gossip plugin was removed a while back. Maybe a migration step was missed during the upgrade process, or maybe it’s actually normal to still see this channel in use. I’m not sure. I’m on Oban 2.17, Oban Met 0.1.7, Oban Pro 1.3.5.

Oban requires pubsub to function, particularly Web, but it doesn’t need to use Postgres. In fact, we recommend switching to an alternate notifier (like PG) in the Web installation guide.

It’s common for large payloads to be exchanged during shutdown, when the nodes shutting down hand off the stats history to new nodes. That’s one of several reasons we recommend the notifier for Web (as linked above), and in the scaling guide.

The Gossip plugin was deprecated, as was Web’s Stats plugin, and they were replaced by the oban_met package. That still uses the oban_gossip channel to communicate about queue activity.

1 Like