Sending Newsletter never completes successfully

Started by StevenTing, November 05, 2013, 02:39:47 PM

Previous topic - Next topic

StevenTing

When I sent a newsletter, whether through email or PM, it never sends to everyone.  It always times out. I have two forums and both experience similar problems.  The most recent one gave me this error.

Fatal error: Maximum execution time of 30 seconds exceeded in /home/********/public_html/Sources/Subs-Db-mysql.php on line 232   

Can someone shed some light on this?  Is there a way I can increase the maximum execution time?  I've tried to send the newsletter out multiple times and it seems like it always crashes without sending to everyone.

I'm using the following template.


Quote
Hello {$member.name},


Once again, we we hope you like this new addition and we welcome any feedback.

Regards,
The  ******* Team.

{$board_url}

kat

Your host might have restrictions, on the number of mails that can be sent, in certain periods of time.

If you find out what those limits are (Saves server overloads), you can set those limits in the mail setting in SMF. :)

StevenTing

Quote from: K@ on November 05, 2013, 02:50:12 PM
Your host might have restrictions, on the number of mails that can be sent, in certain periods of time.

If you find out what those limits are (Saves server overloads), you can set those limits in the mail setting in SMF. :)

On one server, there is a limit of 210 emails per 5 minutes.  This server only has 500 members and I have it limited to send no more than 30 per minute.  In this case, only 276 messages got sent.

On my other server, it is a Linode where there is no restriction.  This server has 4000 members and I have it limited to send no more than 10 per minute.  In this case, only about 450 got sent.

I tested by sending to 1 account and I saw the 100% status bar.  In my two live newsletters, when I sent on each server, I never saw the status bar.  It just went to a blank page where the URL had "mailsend" in it.  I don't remember the exact link as this was yesterday evening.  When I refresh the page, that's where I see that it failed.


StevenTing

I forgot to add that both forums are running 2.0.6 software.

vbgamer45

Modify sources/ManageNews.php
Find

<?php

Add after

ini_set('max_execution_time',3600);


That will allow it to process longer.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro


StevenTing

Thank you.  I will give this a try.  I appreciate your help.

One question, does this file get updated with the SMF Updates?  If so, I assume I need to make this edit after every upgrade.

vbgamer45

It can be. But generally only updated if you do a large upgrade.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

StevenTing

Okay, I tried the fix on my smaller forum and it did not fix my issue.  When I run it, it got up to 450 Messages in the Queue and I have 520 members.

It returned the blank page and had the following in the URL.

http://domainname.com/admin/?area=news;sa=mailingsend

Any additional ideas?  I'd like to get this right before I do my larger forum.

vbgamer45

I would disable action url rewriting in the urls
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

StevenTing

Are you suggesting this only when I send out newsletters or in general?  I send out a newsletter maybe once or twice a year.  This will be my first time in 18 months for my smaller website and 3rd time in 5 years for my larger site.

StevenTing

Disregard the Above.

I disabled PrettyURL's and then ran it and it was successful. I even saw the 100% status bar.  Thank you for your help.  Now off to try it on the larger forum.

Advertisement: