Recurrent Notifications from User Post due to Follow User plugin

Hi Guys,

One quick doubt, since I recovered my site from a backup, any time this one specific user replies to a topic, it generates constant “Edit” notifications to the user that created the Topic or that was being replied to.

Tried to investigate and seems like there is something weird in Sidekiq, on the “Retries” section some jobs just keep piling there and never seem to succeed. After removing them, the notifications stop (until the person posts on another topic and then a new one is generated).

The messages have this format:

Next Retry Retry Count Queue Job Arguments Error
in 1 minute 10 default Jobs::PostAlert {“post_id”=>25977142, “new_record”=>true, “options”=>nil, “current_site_id”=>“default”} Jobs::HandledExceptionWrapper: Wrapped ActiveRecord::RecordNotFound: Couldn’t find User with ‘id’=1452

From what I can infer here, it seems that a user doesn’t exist (even though it happens with the posts of a user that does exist and is active). So maybe is another one. Is there a query or something that I can do to double check this?

I tried some looking at the doc but if I need to “fix” something I’m nervous of blowing something up :sweat_smile:

Grateful for any help!


Small Update:

  • Only happens with that one user.
  • Shows as if every message that user wrote is being “edited” in the notifications that users get (aka: if it is answering to another user, then that user will get recurrent “edit notifications” about that one post).
  • Rebuild doesn’t affect the issue.
  • Deleting the retrying job on Sidekiq seems to stop it forever for that one notification, but everytime that user posts, happens again.

Quick Edit:

  • Tried querying for that user, doesn’t exist, but I don’t see how that links it to an existing one (maybe the query is wrong?) On the admin page, looking at this post for both the query and the Admin URL, I do have a “1451” user and a “1453” user, but (as the error says) not a “1452” one. And the user that “triggers” this is a mod and his user ID is 55 :stuck_out_tongue:

Quick Edit +:

  • Been here thinking. Can someone tell me the implications of “Injecting” the so called “missing user” that I have in the errors? That is, if I add that line to the DB would Sidekiq and the jobs stop failing?
1 Like

Are you using the Follow User plugin by any chance? I ran into a similar issue where deleted users would not be removed from someone’s following and notifications would get stuck in a loop. My solution was to manually remove some records from the database. The issue in the plugin has been fixed, but if you’re on an older version you might still run in to this.


Holy Discourse! Yes I am! :stuck_out_tongue:

Gonna check the version just to see if it can be related. A million thanks @bartv!


Great! Note that even if the plugin has been updated, your data may have been corrupted by the older version. I dug up my old post about this. It’s not detailed, but maybe it will put you on the right track: