Page 1 of 1

ok to set queue_interval to 0?

Posted: Wed Sep 04, 2013 1:42 pm
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.)

Re: ok to set queue_interval to 0?

Posted: Thu Sep 05, 2013 12:02 am
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.

Re: ok to set queue_interval to 0?

Posted: Sun Sep 08, 2013 11:49 pm
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.