# How to know if message bus is still active

**URL:** https://meta.discourse.org/t/how-to-know-if-message-bus-is-still-active/199997
**Category:** Development
**Created:** [August 10, 2021, 7:49pm UTC](https://meta.discourse.org/t/how-to-know-if-message-bus-is-still-active/199997 "2021-08-10T19:49:15Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [August 10, 2021, 7:49pm UTC](https://meta.discourse.org/t/how-to-know-if-message-bus-is-still-active/199997/1 "2021-08-10T19:49:15Z")

</div>

I’m working on this plugin that does Discourse rebuilds. It’s pretty darn close. The thing that’s bugging me now is that I have a status page that gives updates as things happen in the upgrade. But it takes a long time and (I think) eventually the message bus times out because there’s no activity on the page. If the user navigates away and back to the page it works fine.

Is there a way to fix this? Maybe put something in the page that will do a reload every 5 minutes or something like that?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [August 11, 2021, 4:42am UTC](https://meta.discourse.org/t/how-to-know-if-message-bus-is-still-active/199997/2 "2021-08-11T04:42:07Z")

</div>

MessageBus recovers from broken connections, etc, maybe your channel name changes on reload?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [August 11, 2021, 6:33pm UTC](https://meta.discourse.org/t/how-to-know-if-message-bus-is-still-active/199997/3 "2021-08-11T18:33:11Z")

</div>

So MessageBus should keep updating a page forever, even if the browser is idle? What does `REQUEST_QUEUE_SECONDS` do? (Oh, it’s only if the server is flooded?)

But . . . it looks like maybe my problem had to do with something getting pushed to MessageBus that shouldn’t have. WIth Rails, Ember, and Ansible all at play, it’s hard for me to know who to blame. 🤷‍♂️

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [August 11, 2021, 11:07pm UTC](https://meta.discourse.org/t/how-to-know-if-message-bus-is-still-active/199997/4 "2021-08-11T23:07:53Z")

</div>

The more message bus fails, the more it backs off:

> <https://github.com/discourse/message_bus/blob/main/assets/message-bus.js#L301-L303>

Maybe you were in a situation where it was failing for a huge amount of time and then the backoff just got too big for you.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [August 11, 2021, 11:45pm UTC](https://meta.discourse.org/t/how-to-know-if-message-bus-is-still-active/199997/5 "2021-08-11T23:45:07Z")

</div>

Hmm. No. I think I just didn’t understand at all what my problem was. From the beginning I was sure that it just stopped listening at some point, but I was wrong. Thanks very much. I really appreciate it.
