# Notifications stuck on non-existing users due to follow plugin

**URL:** https://meta.discourse.org/t/notifications-stuck-on-non-existing-users-due-to-follow-plugin/126811
**Category:** Support
**Created:** [26 באוגוסט,‏ 2019,‏ 7:29am UTC](https://meta.discourse.org/t/notifications-stuck-on-non-existing-users-due-to-follow-plugin/126811 "2019-08-26T07:29:46Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![bartv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bartv/32/130052_2.png) [@bartv](https://meta.discourse.org/u/bartv)
#### Post date: [26 באוגוסט,‏ 2019,‏ 7:29am UTC](https://meta.discourse.org/t/notifications-stuck-on-non-existing-users-due-to-follow-plugin/126811/1 "2019-08-26T07:29:47Z")

</div>

Hi,

My users are reporting an issue where they will keep getting the same notification for new posts. I’ve tracked it back to a non-existing user, and it seems Sidekiq keeps retrying these notifications which results in the these people getting the notification multiple times.

I have killed these retries in the past, but they’ll resurface after a while. Shouldn’t they just ‘give up’ and not retry?

 ![42](https://global.discourse-cdn.com/meta/original/3X/b/c/bce41bc31a6aa89bce1421ef9afd2dc7cfef8c55.png)

---

<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: [26 באוגוסט,‏ 2019,‏ 7:49am UTC](https://meta.discourse.org/t/notifications-stuck-on-non-existing-users-due-to-follow-plugin/126811/2 "2019-08-26T07:49:24Z")

</div>

This is odd for sure. Can you sweep the DB searching for user\_id 44269, maybe when we nuke the user record we left it around in some tables and this is triggering the issue.

---

<div class="post-metadata">

### Author: ![bartv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bartv/32/130052_2.png) [@bartv](https://meta.discourse.org/u/bartv)
#### Post date: [26 באוגוסט,‏ 2019,‏ 7:50am UTC](https://meta.discourse.org/t/notifications-stuck-on-non-existing-users-due-to-follow-plugin/126811/3 "2019-08-26T07:50:38Z")

</div>

‘Sweep’? Is there a quick way to do that, or do I need to inspect every table separately?

---

<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: [26 באוגוסט,‏ 2019,‏ 7:55am UTC](https://meta.discourse.org/t/notifications-stuck-on-non-existing-users-due-to-follow-plugin/126811/4 "2019-08-26T07:55:26Z")

</div>

You would need a script for it. I would start though by looking at `topic_users`

---

<div class="post-metadata">

### Author: ![bartv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bartv/32/130052_2.png) [@bartv](https://meta.discourse.org/u/bartv)
#### Post date: [26 באוגוסט,‏ 2019,‏ 7:57am UTC](https://meta.discourse.org/t/notifications-stuck-on-non-existing-users-due-to-follow-plugin/126811/5 "2019-08-26T07:57:54Z")

</div>

Done; it returns nothing. Any other tables that could trigger this?

```sql
select *
from topic_users
where user_id = 44269

```

---

<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: [26 באוגוסט,‏ 2019,‏ 8:00am UTC](https://meta.discourse.org/t/notifications-stuck-on-non-existing-users-due-to-follow-plugin/126811/6 "2019-08-26T08:00:42Z")

</div>

Very weird… maybe the user is watching all posts … had mailing list mode enabled and now has orphan records for watching stuff.

---

<div class="post-metadata">

### Author: ![bartv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bartv/32/130052_2.png) [@bartv](https://meta.discourse.org/u/bartv)
#### Post date: [26 באוגוסט,‏ 2019,‏ 8:18am UTC](https://meta.discourse.org/t/notifications-stuck-on-non-existing-users-due-to-follow-plugin/126811/7 "2019-08-26T08:18:50Z")

</div>

I looked in the [Data Explorer](https://meta.discourse.org/t/32566?silent=true) but can’t find anything relevant. Do you have other suggestions where I can look?

I’m traveling this week, but when I’m back I can download a DB dump and do a search for this value too, I suppose.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [26 באוגוסט,‏ 2019,‏ 3:02pm UTC](https://meta.discourse.org/t/notifications-stuck-on-non-existing-users-due-to-follow-plugin/126811/8 "2019-08-26T15:02:36Z")

</div>

Do you have any third party plugins installed?

---

<div class="post-metadata">

### Author: ![bartv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bartv/32/130052_2.png) [@bartv](https://meta.discourse.org/u/bartv)
#### Post date: [27 באוגוסט,‏ 2019,‏ 7:21am UTC](https://meta.discourse.org/t/notifications-stuck-on-non-existing-users-due-to-follow-plugin/126811/9 "2019-08-27T07:21:36Z")

</div>

Yes, a few. But I’ll dive into the database first before disabling anything on my production box.

---

<div class="post-metadata">

### Author: ![bartv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bartv/32/130052_2.png) [@bartv](https://meta.discourse.org/u/bartv)
#### Post date: [24 בספטמבר,‏ 2019,‏ 6:31am UTC](https://meta.discourse.org/t/notifications-stuck-on-non-existing-users-due-to-follow-plugin/126811/10 "2019-09-24T06:31:48Z")

</div>

I think I tracked this down to the [Follow plugin](https://meta.discourse.org/t/follow-plugin/110579/41).

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [24 בספטמבר,‏ 2019,‏ 5:49pm UTC](https://meta.discourse.org/t/notifications-stuck-on-non-existing-users-due-to-follow-plugin/126811/11 "2019-09-24T17:49:59Z")

</div>


