subscriptions_mail_cron was unable to send out subscription notifications, resulting in this error:

PDOException: SQLSTATE[22003]: Numeric value out of range: 1690 BIGINT UNSIGNED value is out of range in '("mintd7"."subscriptions_queue"."last_sent" + "mintd7"."subscriptions_queue"."send_interval")': SELECT * FROM {subscriptions_queue} WHERE suspended = 0 AND last_sent + send_interval < :time ORDER BY sqid LIMIT 0, 1

Upon investigation, I discovered that this error was being caused because the default send_interval was still set to -1 in the subscriptions_queue table, thus causing a conflict with the unsigned integer last_sent column. Further investigation I found that this was caused because the Subscriptions interval settings for users was set to Permanently hidden except for preferences and the user also had not set their preferences; ie, new user was created, new user subscribed to content without setting their interval in user/uid/subscriptions.

I am preparing a patch to notify users that they must set this value prior to subscribing to content.

CommentFileSizeAuthor
#1 unsigned-integer-error-1942484-1.patch1.57 KBdpintats

Comments

dpintats’s picture

StatusFileSize
new1.57 KB
salvis’s picture

Thank you for investigating this. What database are you using?

Forcing the user to do something is not so nice and probably increases the support load of the admin. We need to avoid that.

dpintats’s picture

Sure, just patched it up so as to prevent any further damage, but I figured I'd leave it to you to decide if it'd be best to default to the first interval or not. Using Mysql 5.5.25 on Pantheon. Possibly could be a Pantheon specific Mysql version issue, but not sure. If you'd like, I can patch it so that it opts to use a valid interval?