Notification email delay

Forum News, Announcements and any issues you're having with the forum
User avatar
xantia_v6
Forum Admin Team
Posts: 10807
Joined: 09 Nov 2005, 22:03
x 1387

Re: Notification email delay

Unread post by xantia_v6 »

The notification delay is fixed for now, but I think that it may come back, it is not clear what is going on with the database lock, but we shall see.
User avatar
mickthemaverick
Forum Admin Team
Posts: 20509
Joined: 11 May 2019, 17:56
x 7916

Re: Notification email delay

Unread post by mickthemaverick »

Thanks Mike, it is working properly at the moment as is evidenced by this response. Well done !! :) :) :)
I used to be indecisive, now I'm not so sure!
I used to ride on two wheels, but now I need all four!
User avatar
mickthemaverick
Forum Admin Team
Posts: 20509
Joined: 11 May 2019, 17:56
x 7916

Re: Notification email delay

Unread post by mickthemaverick »

Sorry to say no notifications as yet from the last 5 posts which have gone on!! :cry:
I used to be indecisive, now I'm not so sure!
I used to ride on two wheels, but now I need all four!
Hell Razor5543
(Donor 2023)
Posts: 14269
Joined: 01 Apr 2012, 09:47
x 3281

Re: Notification email delay

Unread post by Hell Razor5543 »

mickthemaverick wrote: 19 Jul 2020, 17:33 Sorry to say no notifications as yet from the last 5 posts which have gone on!! :cry:
Ah, that is to save postage costs. The system waits until there are enough emails to get a job lot discount, and then dispatches them to you.
James
ex BX 1.9
ex Xantia 2.0HDi SX
ex Xantia 2.0HDi LX
ex C5 2.0HDi VTR
ex C5 2.0HDi VTR
ex C5 2.2HDi VTX+

Yes, I am paranoid, but am I paranoid ENOUGH?
Out amongst the stars, looking for a world of my own!
User avatar
mickthemaverick
Forum Admin Team
Posts: 20509
Joined: 11 May 2019, 17:56
x 7916

Re: Notification email delay

Unread post by mickthemaverick »

Just had 10 emails 5 mins after Steve posted ! :(
I used to be indecisive, now I'm not so sure!
I used to ride on two wheels, but now I need all four!
User avatar
xantia_v6
Forum Admin Team
Posts: 10807
Joined: 09 Nov 2005, 22:03
x 1387

Re: Notification email delay

Unread post by xantia_v6 »

I have a theory that we have run into a bug or design flaw in the form software that has been exposed by changing to a different web server package.

I will live with this problem for a few days while trying to track down the root cause.
User avatar
xantia_v6
Forum Admin Team
Posts: 10807
Joined: 09 Nov 2005, 22:03
x 1387

Re: Notification email delay

Unread post by xantia_v6 »

While browsing the forum source code looking for potential problems, i did find what appears to be a bug.
I have made a small correction to it and we are now testing the results.
User avatar
GiveMeABreak
(Donor 2016)
Posts: 41989
Joined: 15 Sep 2015, 19:38
x 6960

Re: Notification email delay

Unread post by GiveMeABreak »

Have you checked the task queue setting?

To ensure notification emails go out immediately while still making use of the task queue, set the configuration parameter "queue_interval" to 0. Also ensure email package size is set to a very large number.

The queue_interval parameter is not accessible via the Administration Control Panel or anywhere else in the web interface. You'll have to set it directly in the database's config table.

But contrary to the above, the support Team commented that "If you set the Email Package Size to zero on the Email Settings page, phpBB does not queue up the emails."

https://www.phpbb.com/community/viewtopic.php?t=2164504"
Please note, I'm no longer active on the Forum, so won't respond to messages.

Marc
User avatar
xantia_v6
Forum Admin Team
Posts: 10807
Joined: 09 Nov 2005, 22:03
x 1387

Re: Notification email delay

Unread post by xantia_v6 »

Yes I have investigated the settings and have chosen values which should work, although I think that the overall algorithm could be improved a little.

The bug that I spotted above however means that the algorithm has never (at least for the past 4 years) worked as intended, as most of the time the email queue was locked, just occasionally being unlocked to send out a bunch of queued emails.
User avatar
xantia_v6
Forum Admin Team
Posts: 10807
Joined: 09 Nov 2005, 22:03
x 1387

Re: Notification email delay

Unread post by xantia_v6 »

The problem is evidently still present and is definitely a problem with the cron_lock. I will take a look at it tonight, unfortunately this bug only seems to be visible on the live forum, so is a bit tricky to track down.
Hell Razor5543
(Donor 2023)
Posts: 14269
Joined: 01 Apr 2012, 09:47
x 3281

Re: Notification email delay

Unread post by Hell Razor5543 »

Alright, who has pinched/lost the key to the email queue?
James
ex BX 1.9
ex Xantia 2.0HDi SX
ex Xantia 2.0HDi LX
ex C5 2.0HDi VTR
ex C5 2.0HDi VTR
ex C5 2.2HDi VTX+

Yes, I am paranoid, but am I paranoid ENOUGH?
Out amongst the stars, looking for a world of my own!
User avatar
xantia_v6
Forum Admin Team
Posts: 10807
Joined: 09 Nov 2005, 22:03
x 1387

Re: Notification email delay

Unread post by xantia_v6 »

I believe that the problem is now fixed. I did find a couple of instances of inappropriate coding in the forum software, but I have to put my hand up and say that the actual cause of the problem was a piece of code that I wrote in a new security plugin that I installed a couple of weeks ago.

It was not connected with the server software reconfiguration that I started a few days ago. The faulty code was not even part of the mail delivery system, it just happened to share the same background task lock.
User avatar
mickthemaverick
Forum Admin Team
Posts: 20509
Joined: 11 May 2019, 17:56
x 7916

Re: Notification email delay

Unread post by mickthemaverick »

Brilliant Mike, nothing beats actually finding a cause. Have a beer on me Cheers
I used to be indecisive, now I'm not so sure!
I used to ride on two wheels, but now I need all four!