stream icon indicating copy to clipboard operation
stream copied to clipboard

Stream suddenly sent tons of alerts based on hidden post type, possibly due to REST API change in 3.9.0

Open cbirdsong opened this issue 3 years ago • 2 comments

Yesterday one of our sites suddenly started sending tons of Stream alert emails about deleted items. It had this alert configured:

CleanShot 2022-03-10 at 08 52 22

This site has Post SMTP plugin installed with logging enabled. It uses a hidden postman_sent_mail custom post type for logged items, and it limits the log size by is a fixed number of posts, instead of a time period like Stream:

CleanShot 2022-03-10 at 09 42 14

Stream's records show "item deleted" alerts being sent after Post SMTP sends and logs an email, which creates a new postman_sent_mail and presumably also deletes the oldest one: stream-filtered-redacted.csv

This seems like it could be a consequence of monitoring REST API changes (https://github.com/xwp/stream/pull/1264), so it might be good if alert monitoring only applies to public post types by default?

cbirdsong avatar Mar 10 '22 15:03 cbirdsong

Thanks for the detailed report @cbirdsong! Can you please confirm if this is happening when new postman_sent_mail posts are created and deleted as the Post SMTP plugin schedules and sends emails?

kasparsd avatar Mar 11 '22 16:03 kasparsd

I disabled the alert as soon as I discovered it and didn't attempt to debug by triggering any further emails since it was on a live site, but the times in the Post SMTP log lined up exactly with the Stream log/emails.

cbirdsong avatar Mar 11 '22 17:03 cbirdsong