Newsletter can not create more than 45 emails

Started by Glasso, November 01, 2010, 08:43:08 AM

Previous topic - Next topic

Glasso

Hi,

I am trying to send an email newsletter to 300 members of my forum, and SMF creates exactly 45 emails and then gets to a blank page. The 45 emails get sent out properly - I have mail queue enabled with 4 mails per minute and 12 mails per page load. I am using SMTP and all emailing for notifications, new member registrations is all fine.

My hosting has a limit of 300 mails per hour and I am well within that limit with 4/minute. However, the issue seems to be in creation of the emails than in sending them out.

I have tried clearing the cache, lowering the per minute and per page load limits, but exactly 45 emails still get created and then the newsletter page just gets blank, the url being hxxp://example.com/forum/admin/?area=news;sa=mailingcompose

My php memory limit is reasonable at 64M and I have also tried 128M with no success. I don't know if it is to do with php execution time, but wouldn't that be automatically taken care by the per page load setting? I have tried different browsers too.

Nothing is logged in error log.

I appreciate help, thanks.

Edit: Additional information - I have tried disabling PrettyURLs based on a comment in this forum that it was a problem, but this did not help either.

Chas Large

What happens if you do an announcement e-mail to your members - New post > Additional Options > Announce topic.

Do all these e-mails go out?
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Glasso

#2
Sorry, I have not tried an announcement, and I can't do it until I find a suitable topic again.

That said, all other email functions work fine. In fact, I sent out the newsletter by manually inputting the email ids in chunks of 45 and they went well, through the queue over a period of time.

But I will need to find a solution to this before next month's newsletter.

Edit: I just managed to create an announcement topic. It created about 340 emails like a charm, queued them and drip fed to the mail server for delivery. Clearly, the issue is to with the newsletter alone. Any thoughts to troubleshoot please?

Edit2: I just realized another thing. The mail queue settings are not being honoured. I have my mails at 4/minute (=240/hour) and 24/page load, but all 340 were pushed out in a span of less than half hour, resulting in 40 delivery failures (limit per hour is 300). The queue is working but not with the settings on the page. Any thoughts please?

Glasso

#3
Same issue on this topic: http://www.simplemachines.org/community/index.php?topic=392697.0 (unsolved) - looks like two SMF bugs to me  :(

1) blanking out in creating the email queue
2) not honouring the queue settings on the Mail page

I suspect with my limited knowledge that since the page load limit is not being honoured, SMF is attempting to create all 340 emails in one page load and is timing out once php execution time limit is reached, particularly since SMTP would be slower. Any ideas where I can debug this code?

Thanks!

Norv

Is there anything in the webserver's (not SMF's) error log? Specially if you could make sure that logging is enabled, for PHP errors as well.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Glasso

I am on shared hosting - so unfortunately no access to logs. The cpanel error log shows nothing though.

If there is something I can do to help debug, please let me know. Thanks.

Norv

Afaik on some shared hosting, there are logs available... They can (and do) log separately per domain and make them available.
If they do, for all I remember, the logs might be in the panel, as "logs" or "raw logs", or it might be in the user FTP account, as a separate /logs folder.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Glasso

Sorry no luck on the logs. I just searched all the cpanel options and directories. Also spoke to the hosting provider - nothing they can provide :(

Norv

No problem, thank you very much for trying. I will see about it, as soon as I can replicate it.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Glasso

// Send 50 at a time, then go for a break...

I have a feeling there is some hard coding in ManageMail.php: in ClearMailQueue() for number of emails (50) and pauseMailQueueClear() for time limit (600); the variables don't seem to be used.

Also in ManageNews.php, it appears that $num_at_once is not getting initialized with the queue settings in the function SendMailing.

That is about as much I can help pretending to understand the code, I may just have said complete gibberish. I will step back and let the experts help out.

Thanks.

Glasso

Hi Norv.

Were you able to take a look? Anything anyone can help you with?

Thanks.

Chas Large

Sorry but this is beyond my knowledge limit.

@Glasso, are you still running RC3? It might fix things if you upgrade to RC4, seems a bit more stable to me.
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Glasso

Yes Chas Large, still on RC3 since many mods are not upgraded yet.

Also, Norv said this could be a bug that has not been considered for RC4 since it was not known as one.

Deaks

Glasso  do y ou still get this error, best  bet is to upgrade to RC4 and see if that does help, ask it does seem isolated to your site, if your mods are for RC3 then they will most likley work on RC4 (ive yet to have issues with mods for RC3) remember in 2.0 there is the emulate option :) ... if you do upgrade remember please do backup first.
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Glasso

Thanks Runic. Norv confirmed this is not fixed by RC4 here: http://www.simplemachines.org/community/index.php?topic=392697.msg2842363#msg2842363
Also, others have this issue too :(

That said, I will try to upgrade to RC4 even if not for this issue. :)

Deaks

well it could be down to your file itself thats why I suggested it :)
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Glasso

Quote from: Runic on November 22, 2010, 02:02:56 PM
well it could be down to your file itself thats why I suggested it :)

Sorry, I missed that. You mean the issue could be my installation alone? You mean due to some mod?

I will upgrade and post back anyway. Would you suggest a fresh install?

Deaks

~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Garry1953

#18
I'm also experiencing problems with News Letters. 2.0 RC4

I click on the Admin Maintenance Mail and get the below error. (I have a mail Que of 501 being sent)

Fatal Error
ManageMail.php(137) : runtime-created function on line 2

return strlen($rowData[\'subject\']) > 50 ? sprintf(\'%1$s...\', substr(htmlspecialchars($rowData[\'subject\']), 0, 47)) : htmlspecialchars($rowData[\'subject\']);

Replacing that line with 2.0 RC3 it now shows correctly.
return $smcFunc[\'strlen\']($rowData[\'subject\']) > 50 ? sprintf(\'%1$s...\', htmlspecialchars($smcFunc[\'substr\']($rowData[\'subject\']), 0, 47)) : htmlspecialchars($rowData[\'subject\']);

The mail seems to send correctly under 2.0 RC4 but I'm unable to see it from admin.

Glasso

The original issue remains in a fresh install of RC4.

It is sad the developers don't pay attention to the issue.

Advertisement: