stalled mailings, inprocess, requeue

Solutions for other advanced phplisters

stalled mailings, inprocess, requeue

Postby jfriesen » 7:22pm, Fri 15 Sep, 2006

I'm looking for some clarity on the issue of stalled mailings, the "stuck" inprocess status and requeuing.

My mailing list is at about 900. Here are my batch configurations:

define("MAILQUEUE_BATCH_SIZE",500);
define("MAILQUEUE_BATCH_PERIOD",3600);


So, 500 emails in a batch sent every hour, right? This does not work as expected. My last sent newsletter stalled after sending around 200 emails. The batch never reloads, so my stalled newlstter just sits on the "messages" page showing "inprocess". There is no link to requeue visible for this particular message.

In the database, there was an entry listed in the sendprocess table:

`phplist_sendprocess` (`id`, `started`, `modified`, `alive`, `ipaddress`, `page`) VALUES (25, '2006-09-15 09:28:47', '20060915093258', 332, 'xx.xx.xx.xx', 'processqueue');


Going on the advice of another poster in here, I deleted this entry (see: http://forums.phplist.com/viewtopic.php?t=2877). According to that advice, this should have restarted the sending process, but it did not.

Next, I logged into the application, then clicked "messages" to see the sent message. Still "inprocess". I clicked "process queue" from the main menu, then the emails went out as expected. Yay!

I would like to be able to click processqueue ONCE, when I send the newsletter, then have PHPlist manage all the queue processing that needs to happen, WITHOUT any manual intervention. My mailing list is not even at 1000, so I must assume this is possible.

There are many posts about this issue and they describe different possible fixes, for example:

http://forums.phplist.com/viewtopic.php?t=6057
http://forums.phplist.com/viewtopic.php?t=5663

Do I need to:

1) Increase the PHP memory on the web server?
http://forums.phplist.com/viewtopic.php?t=2877

2) Reduce the batch size and frequency?
http://forums.phplist.com/viewtopic.php?p=20974#20974

3) Upgrade to 2.10.2 (is there a known issue with batch mail in 2.9.3?)

I can try out all three of these solutions, but before I start mucking about, I'm just wondering if there is an official PHPlist method for effectively dealing with this recurring issue.

Thanks in advance!
JF ;)
jfriesen
PL Geek
 
Posts: 72
Joined: 5:43am, Wed 26 Jan, 2005

Postby patrick101 » 10:28pm, Mon 18 Sep, 2006

I am suffering just the same. Sent about 200+ emails out of my list of 543. The status says 'in progess'. Clicking Process Queue again does nothing for me.

Annoyingly, when it comes to sending a new newsletter some of the old ones get pushed through. By this time they are irrelavent and makes me look stupid! (maybe I am!!)

I keep my eye on this post with anticipation.

Patrick
patrick101
PL Nut
 
Posts: 18
Joined: 2:32pm, Thu 28 Apr, 2005
Location: Lincoln, UK

Postby Hernol » 2:10pm, Tue 19 Sep, 2006

The best one will be upgrade to the new version. Maybe do a new installation without deleting the old one, to check if the old version is causing the trouble.
Hernol
Admin
 
Posts: 1378
Joined: 6:39pm, Thu 18 May, 2006
Location: Argentina

Postby mattadams » 1:02pm, Fri 22 Sep, 2006

I seem to be running into the same thing, but I'm running the latest version released... so I must be missing something. I have a 200 e-mail/hr. limitation with my host and about 800 people on my mailing list, so I set it to 175 emails per batch (since I send other emails as well) with a batch time of 3600... it seems to get through the first batch and then sit... last night I let it sit all night thinking maybe it just forgot what it was doing or whatever but it made no difference... finally I canclled it and started it again and then it went through to finish that batch, and now appears to be waiting again.

Some of my important settings are:
define("MAILQUEUE_BATCH_SIZE",175);
define("MAILQUEUE_BATCH_PERIOD",3600);
define('MAILQUEUE_THROTTLE',20);

So my understanding is it will send out 175 e-mails per hour, with a space of 20 seconds between each message which equals a few minutes shy of an hour.
A little stumped, I guess...
mattadams
phpLister
 
Posts: 5
Joined: 9:06pm, Wed 20 Sep, 2006

Postby geckoday » 10:53pm, Thu 28 Sep, 2006

I beat my head against this one for a while and finally found that using the batch size/period seems to be the problem. Just set batch size to 0 and use throttle to control the send rate. When you Process Queue from the web page it will run it in the background and process the whole message sending at the rate you specified with throttle. You will get an email when it completes but you have no visibility that anything is happening while the send is going on.

I go to phpmyadmin and do a select count(*) FROM phplist_usermessage WHERE messageid=?? to monitor the sending.
geckoday
phpList newbie
 
Posts: 1
Joined: 10:43pm, Thu 28 Sep, 2006

Postby patrick101 » 7:12pm, Fri 06 Oct, 2006

Ralph,
That sounds perfect. I cant wait until it's time for my next mailout to give it a try!

I'll let you know how I get on.

Patrick
patrick101
PL Nut
 
Posts: 18
Joined: 2:32pm, Thu 28 Apr, 2005
Location: Lincoln, UK

Perfect!

Postby patrick101 » 11:17am, Mon 05 Mar, 2007

Thanks Ralph,

Throttling was the answer! Forgot to get back to you until now... I have installed the latest version and all the settings in the original config got writtenover! I just came back here to be reminded of your good advice!

Patrick
patrick101
PL Nut
 
Posts: 18
Joined: 2:32pm, Thu 28 Apr, 2005
Location: Lincoln, UK

Monitor number sent

Postby robidigital » 7:32pm, Thu 05 Jul, 2007

I created a small php script to check the number of email sent. It does the same thing as the sql query geckoday posted for monitoring. All you have to do is plugin the database settings. Hope this helps.

Code: Select all
//database settings
$dbname = "XXXX";
$dbhost = "XXXX";
$dbuser = "XXXX";
$dbpass = "XXXX";

$dbh=mysql_connect ($dbhost, $dbuser, $dbpass) or die ('I cannot connect to the database because: ' . mysql_error());

$query = "select count(*) FROM phplist_usermessage WHERE messageid=19";

$sendcount = mysql_db_query($dbname,$query);

$mycount = mysql_result($sendcount,0);

echo '<p><strong>' . $mycount . '</strong>&nbsp;mailings have been sent</p>';
robidigital
phpList newbie
 
Posts: 3
Joined: 7:23pm, Tue 30 May, 2006

Postby candy » 11:31pm, Mon 24 Sep, 2007

i don't even have the Throttle setting anywhere in my config.php file and i am having the same problem....messages only get sent to a few email addresses and then get stuck.

any ideas are GREATLY appreciated. Thanks.
candy
phpList newbie
 
Posts: 2
Joined: 4:16am, Sun 09 Jan, 2005

Postby H2B2 » 9:59pm, Sun 30 Sep, 2007

candy wrote:i don't even have the Throttle setting anywhere in my config.php file and i am having the same problem....messages only get sent to a few email addresses and then get stuck.
The settings regulating the send rate are explained in the docs: http://docs.phplist.com/PhpListConfigSendRate
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Re: stalled mailings, inprocess, requeue

Postby djmike » 4:36pm, Fri 24 May, 2013

After a week of troubleshooting, I figured out MAILQUEUE_THROTTLE doesn't work right. Might be my server. But here's a crazy logic defying solution that worked for my situation. Improvise.

define("MAILQUEUE_BATCH_SIZE",1);
define("MAILQUEUE_BATCH_PERIOD",8);
define('MAILQUEUE_THROTTLE',0);

This will send approx 360 emails an hour due to .2/.3 second additional processing time to deliver each message. No delays. Process queue refreshes and sends emails as intended.
djmike
phpLister
 
Posts: 6
Joined: 5:55pm, Wed 22 May, 2013

Re: stalled mailings, inprocess, requeue

Postby relaxesonsand » 1:05pm, Thu 19 Dec, 2013

I found that setting a small batch and small batch time (2 emails in 2 seconds in my case) helped to stop the queue from stalling, in version 3.0.5 it'll show the total sent / total to send each time it reloads.

Also, (in 3.0.5 at least) if you want to bring up the total sent with a mysql query you'll need the status too:

Code: Select all
select count(*) FROM `phplist_usermessage` WHERE `messageid`=<id> AND `status` = 'sent'
relaxesonsand
phpList newbie
 
Posts: 1
Joined: 12:54pm, Thu 19 Dec, 2013


Return to Advanced Answers, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 2 guests