Not Solved [Mail] Y2K with mailqueue table
Not Solved

I want to thank developers for a great forum engine (which, in fact, is less vulnerable to spam in comparison to VBulletin, SMF, PhpBB and other ones).

Today one of users told me that he can't write me a PM, he saw the white screen.
It happens due to disabled error messages. Inverstigation shows that when user sends a PM to other user, that enabled the e-mail notification, the forum engine tries to insert a new mail into the mailqueue table and fails due to OUT OF RANGE error (mailqueue primary index was 2^32).

Quote:Out of range value for column 'mid' at row 1

I've just truncated the table (it was empty). I'm not sure if this problem was previously reported or already fixed. My website exists for more then 8 years, so this auto_increment may hit the limit during this large time interval.

I just want to hear any advice before I'll add few more lines to my optimize / check cron job (to check if this table has 0 lines and truncate the table if so).
Not Solved
It would be surprising if it had reached the limit as that would be 4.2 billion emails - now that it's been truncated it'd be a while before the problem happens again as it would have reset the auto_increment back to 0. Alternatively you could probably change it to be a BIGINT column.
MyReactions - All Plugins

Can you still feel the butterflies?

Free never tasted like pudding.
Not Solved
Of course, this is an impossible number, it's about 1K emails per minute during 9 years. And probably nobody here got this problem even with highload forum.
I've noticed the increment is strange, it was few thousands, maybe some of scripts insert some value and thus it runs faster then it should.

BigInt is not a good idea, just truncate a table at least monthly and it will never happen. I'm going to implement it this week.

P.S. yeah, one of my scripts written in 2013 inserted a timestamp value into this column Big Grin , so auto_increment was faster then it should. Nevertheless, this Y2K-style problem, in my opinion, should be solved in the main branch of code. If not solved yet, I do not look into changelog too often

Forum Jump:

Users browsing this thread: 1 Guest(s)