ok to set queue_interval to 0?

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Anti-Spam Guide
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

ok to set queue_interval to 0?

Post by asinshesq »

Up until now I've had a small enough number of users that I have been able to get away with email_package_size of 0 (which skips use of the email notification queue altogether and instead sends out all notification emails as soon as the poster posts), but because my number of users has grown (and because most people get notifications of every single post), this approach is no longer ideal.

For this reason, I have now set email package size to 80, but I then noticed that it takes a while for notifications to go out. That's because the queue is set (by default) not to be sent until 60 seconds after the queue file is updated so a poster's own post (and the return of the poster to the forum after the post) will not trigger a send. Thus, notifications don't go out until there's some other activity on the forum (that user or another user needs to go somewhere on the forum after the 60 seconds are up to trigger a send).

The simplest workaround is to set queue_interval (in the db table 'phpbb_config') to 0, and that seems to work fine. The traffic is not so heavy as to trigger a violation of any rules imposed by my host on frequency of emailing. Is there any downside to this approach in terms of forum performance? It seems to help rather than hurt in that regard (in comparison to leaving email_package_size at 0). Is there another way I should be considering?

(I realize I can set up an external cron job that calls cron.php periodically but I figured that would create more rather than less strain on resources.)
User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: ok to set queue_interval to 0?

Post by Oyabun1 »

asinshesq wrote:Up until now I've ... I have been able to get away with email_package_size of 0 ... this approach is no longer ideal.
What problems are you seeing?

Alan, you know more about this than I do, but a possible performance issue with setting the queue_interval to 0 may be with the multiple processes related to the cache file (locking, unlocking, checking the lock, and reading and writing the queue data - once for each package) because each subsequent package would be processed without a delay. However, with a package size of 80, unless you have very large numbers of emails there won't be many iterations so that will probably never become a problem.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests
asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: ok to set queue_interval to 0?

Post by asinshesq »

Thanks, Bill. Given my traffic patterns I came to the same conclusion that this shouldn't be a real problem. So far, it seems to be working fine.
Locked

Return to “[3.0.x] Support Forum”