Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved [General] PM e-mails and e-mail subscription alerts seem delayed
#21
Not Solved
MyBB - 1.8.4
PHP - 5.6.6RC1
MySQL - 5.1.73

Mail - PHP Mail

Does that help?
Reply
#22
Not Solved
@Shemo Would you mind if I gave you a slightly modified inc/init.php file to try that does some logging? Just so I can get a trace of what's running when to see if I can track down the issue.
Reply
#23
Not Solved
(03-14-2015, 08:55 PM)Euan T Wrote: @Shemo Would you mind if I gave you a slightly modified inc/init.php file to try that does some logging? Just so I can get a trace of what's running when to see if I can track down the issue.

sure, send it over.
Reply
#24
Not Solved
Hi, the file was actually inc/functions.php. Here's the modified file: https://www.dropbox.com/s/97i7bgxziaaz4x...s.php?dl=0

It should create a file at your MyBB root, called "euantor_mail_log.json". If you send a PM or two, then click around for about 10 minutes, can you send me the contents of that file to have a look at? Thanks.
Reply
#25
Not Solved
Hi Euan,
I know you asked Shemo to do this but thought I would run the test as well.
Created 2 test PM's - clicked around the board.
From what I could determine, the messages didn't get fired until the index page was re-loaded.
Have attached the euantor_mail_log.json file via PM.
(Had to zip it as could upload a json file here)
Thanks
Reply
#26
Not Solved
Hi,

I'll take a look. Me and Shemo transferred a few PMs. He had a mail queue of about 100 messages to process. The mechanism only sends 10 messages at a time by default. Here's the instructions I sent him:

Euan T Wrote:
Shemo Wrote:
Euan T Wrote:
Shemo Wrote:...

is there a way to force all of those messages to be sent?

There's no way to force it that I know of, but it might be partially causing some of the problem. If you restore the original inc/functions.php and find this line:

function send_mail_queue($count=10)
{

If you change the "10" to another number (but not too high - try 20?), it'll process more mails at a time on page load.

The logs you sent look fine to me. It does seem to be processing them,so I'm not exactly sure what would be causing the large delays you are experiencing.

is there a query I can run to check to see how many e-mails are currently queued up?

Try the following:


SELECT COUNT(*) AS num_queued FROM mybb_mailqueue;

That should show the number.
Reply
#27
Not Solved
Hi, just looked at your log and it seems fine. It's logging a single message being in the queue (Sun, 15 Mar 2015 11:05:09 GMT) and then sending that message as an email. Did you send this PM or receive it? If so, when did the email arrive and when was the PM actually sent? If the issue seems to be worst at high load times (lots of PMs being sent), you can try increasing the amount of messages processed from the queue as described above.

Also note I've removed the log file from your post as it contained an email address, which could potentially be sensitive Smile
Reply
#28
Not Solved
OK thanks - I would be happy to run the mail queue via a cron job but not sure of what the command/task would be to get a page load.
Reply
#29
Not Solved
Hi,

That should be feasible and would likely be quite a good idea. I'll write up a quick cron task for you later that may be of use to others too. Unfortunately it'll be a while as I'm just about to leave the house for an hour or so.
Reply
#30
Not Solved
No problem Euan - and much appreciated.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)