News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

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.

Glasso

Just to summarize the issue:

Newsletter email creation times out and results in a blank page after about 45 emails are created and posted to mail queue. Mail queue works fine.

oOo--STAR--oOo

I to am looking for a solution to this problem...

I send mail via newsletter and its adding a bunch to a queue then giving me a WHITE page..
I do not know a way around this and its annoying..

Please can some one made it so that it will send the mail like announce a topic?

I believe using that format will be easier.
You can't fool a sufficiently talented fool.

http://www.uniquez-home.com
In Design Phase!

Mods I am designing,  No refresh Collapse Categories , Poll Redesign , Pure CSS Breadcrumb , Profile Statuses, Profile Views.

Glasso

Quote from: Glasso on January 17, 2011, 02:00:41 PM
Just to summarize the issue:

Newsletter email creation times out and results in a blank page after about 45 emails are created and posted to mail queue. Mail queue works fine.
Bump!
I really hope someone can help sort out this issue - the issue persists even in RC5.

Thanks.

Chas Large

Works OK for me on RC5, I have 200+ members and Newsletter goes to each and everyone, I checked. No white pages. You may have another mod that is interfering or your host has a quota on the number of e-mails that can be sent per minute, check/change mail quota settings.
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

I opened a bug on this and got  a response this is to do with Prettyurls. I need to do more research on this because I have this issue even when I disable Prettyurls. Also disbling Prettyurls affects all my urls - so testing is a little tricky for this.

Chas Large

@Glasso, you say it's still prevalent in RC4. THis fresh install, did it have any other mods in place or just vanilla. Again I'm using RC5 and don't see the problem even with 20+ mods in place.

Also, what mail settings are you using SMTP or PHP Default.

Do you get anything in the SMF error logs? I know you can't see errors on your server. I too am using a shared server.

* Chas Large has searched the Bugtracker and can't find the listing of the bug Norv mentions, perhaps Norv can point me to it?
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.

Norv

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

Yes, that is the one.

Chas Large,
Answers to your questions are covered on that topic.

Thanks.

Chas Large

OK so this problem is now being dealt with in that new topic then by the look of it. Perhaps we should draw a line under this one, not solved but no more input from me at least.
;)
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.

Advertisement: