mattermost-plugin-remind icon indicating copy to clipboard operation
mattermost-plugin-remind copied to clipboard

Recurring reminder silently stops working at some point

Open piotr-wegert opened this issue 6 years ago • 29 comments
trafficstars

Summary

Recurring reminder silently stops working at some point

Steps to reproduce

Set up a recurring reminder on a public channel e.g. /remind ~test_channel "daily" every weekdays at 9:00 am

Expected behavior

Reminder works indefinitely.

Observed behavior (that appears unintentional)

Reminder works fine for some time. At some point (hard to determine exactly when) it silently stops working. There is no error in the UI and no trace in the logs.

Server configuration

Operating system: CentOS Linux release 7.6.1810 (Core), db: postgres

Mattermost version: 5.12.0

Remind version: 0.4.3

Updated from an older Remind bot version or fresh install: Updated from an earlier version

Additional context

So far haven't seen anything suspicious in the logs. At this point I'm also unable to determine when the plugin stops working. I'm running some tests so might have additional details later.

piotr-wegert avatar Oct 18 '19 12:10 piotr-wegert

Are you able to verify if v0.4.4 has the behavior as well?

scottleedavis avatar Oct 18 '19 14:10 scottleedavis

We did try 0.4.4 but got the following error "This plugin failed to start. Check your system logs for errors." and reverted back to 0.4.3.

piotr-wegert avatar Oct 21 '19 07:10 piotr-wegert

Ah that's right. 0.4.4 needs 5.14. Any fix I do will also need 5.14 or later

scottleedavis avatar Oct 21 '19 13:10 scottleedavis

Thanks Scott! We're planning to bump MM to the latest version this week.

piotr-wegert avatar Oct 21 '19 14:10 piotr-wegert

So our reminder stopped working again. It was set up on October 24th and didn't fire up today morning. I can't find anything meaningful in the logs.

Could you please advise?

piotr-wegert avatar Dec 20 '19 08:12 piotr-wegert

Stopped working again. Unfortunately I can't see any pattern.

piotr-wegert avatar Jan 10 '20 08:01 piotr-wegert

Here, all reminders regularly stop working after every update of Mattermost. They are still listed but don't fire any longer.

Using mattermost-plugin-remind - 0.4.4 under docker-compose version of Mattermost 5.19.0 under Debian 4.19.98-1 (2020-01-26) x86_64 GNU/Linux

hullin avatar Feb 11 '20 12:02 hullin

Here, all reminders regularly stop working after every update of Mattermost. They are still listed but don't fire any longer.

Using mattermost-plugin-remind - 0.4.4 under docker-compose version of Mattermost 5.19.0 under Debian 4.19.98-1 (2020-01-26) x86_64 GNU/Linux

Same here.

stevekerrison avatar Feb 18 '20 07:02 stevekerrison

Hi All,

Unfortunately, I am completely booked with my current position and do not have time to debug and fix this.

Would Mattermost be open to supporting this plugin @levb ? I would be happy to transfer ownership.

scottleedavis avatar Feb 18 '20 16:02 scottleedavis

@scottleedavis @jfrerich Let's do this. Jason can help with the intake process.

levb avatar Mar 10 '20 12:03 levb

Hi, our company is using Mattermost Enterprise Edition E10 running on Debian stretch / mysql.

I can confirm the bug as well for Mattermost 5.20.1 and Remindbot 0.4.4.

A fix would be appreciated.

JohannesK142 avatar Mar 19 '20 09:03 JohannesK142

Hello,

We are also facing the same issue. We couldn't determine yet exactly when it occurs, it doesn't follow a pattern, nothing on the logs. We are using MM 5.18.0 and Remindbot 0.4.4

anarute avatar Apr 29 '20 11:04 anarute

@hanzei managing a global team is hard work! I don't have time for this fix... do you perhaps? :)

scottleedavis avatar Apr 29 '20 11:04 scottleedavis

@scottleedavis I feel you :wink: I'm also low on time at the moment. I will take a look once things are slowing down a bit.

hanzei avatar May 02 '20 13:05 hanzei

@scottleedavis do you have any clue of where to look to fix this? I can maybe try to help, but I have no idea where to start

anarute avatar May 02 '20 16:05 anarute

@anarute I am not clear where this issue is rooted from.

I had a guess that it was timer inaccuracy in the scheduler, which wouldn't trigger the event... however a timer inaccuracy doesn't seem highly plausible (to me) as variations in local time on server doesn't seem likely in the scale of seconds. (though... who am I to know this in all env's?) https://github.com/scottleedavis/mattermost-plugin-remind/blob/master/server/scheduler.go#L314

I also thought perhaps somehow the reminder wasn't stored after a 'reschedule' happened in a defer. https://github.com/scottleedavis/mattermost-plugin-remind/blob/master/server/reminder.go#L260

It could be also, something in coding error on scheduling recurring reminders. https://github.com/scottleedavis/mattermost-plugin-remind/blob/master/server/scheduler.go#L11

@lieut-data Had ideas of completely redoing the scheduler, and could perhaps solve this root cause issue with refactoring instead of monkey patching the current approach.

👇 👉 https://github.com/scottleedavis/mattermost-plugin-remind/issues/143. 👈 ☝️

scottleedavis avatar May 02 '20 17:05 scottleedavis

https://www.linkedin.com/posts/skawtus_remind-plugin-activity-6662399044964401152-aCZw

scottleedavis avatar May 02 '20 17:05 scottleedavis

On my machine I observed that it was low on RAM and another process was killed by the kernel scheduler... Maybe the remind bot also needs some protection against that one of its processes is externally killed...

JohannesK142 avatar May 04 '20 14:05 JohannesK142

@levb @lieut-data ?

scottleedavis avatar May 04 '20 15:05 scottleedavis

The cluster package allows the scheduling of jobs in a concurrency save way. Using that package could greatly help with reducing bugs related to the reminder scheduler.

Integration this package would be a good isolated test, maybe even as a Help Wanted.

hanzei avatar May 06 '20 11:05 hanzei

The cluster package allows the scheduling of jobs in a concurrency save way. Using that package could greatly help with reducing bugs related to the reminder scheduler. Integration this package would be a good isolated test, maybe even as a Help Wanted.

Open bug bounty. I'll send a $10 amazon gift card for an approved PR.

@hanzei would you help review the PR too?

scottleedavis avatar May 06 '20 15:05 scottleedavis

@levb @lieut-data are also invited to review a PR.

scottleedavis avatar May 06 '20 15:05 scottleedavis

Sure, I'm happy to review the PR.

hanzei avatar May 06 '20 19:05 hanzei

I will gift a $50 amazon gift card to the first person who completes this PR. And some Mattermost stickers.

IMG_0645 copy

scottleedavis avatar May 10 '20 16:05 scottleedavis

I did not found a similar issue for my scenario, but may be is related to this. In my case the remind feature stops working each time I upgrade mattermost to a new version. Then I have to setup a new reminder and it works again for the new ones but not for the older ones which are never reminded. My reminders are reminder at a specific hour each working day for a given channel. Cheers, Jacq

Jacq avatar Sep 01 '20 11:09 Jacq

Not working reliable for me as well. Would love to have this functionality in core of mattermost, like it's core of slack

alexander-potemkin avatar Oct 06 '21 12:10 alexander-potemkin

I'm guessing the reminders don't survive a Mattermost restart? We deployed it on Kubernetes, so the pod(s) are recycled from time to time.

Is there any way the plugin could store these reminders outside of the process?

Philmod avatar Oct 07 '21 12:10 Philmod

Same here. Can you guys tell if this happens on plugin restart? Or maybe server restart?

DummyThatMatters avatar Apr 25 '22 14:04 DummyThatMatters

need fix for this

iamkhalidbashir avatar Jul 01 '22 12:07 iamkhalidbashir