phplist

NOTE:: Before reporting an issue, make sure you are running the latest version, currently 3.3.1


View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0016873phplist applicationBatch Processingpublic10-09-13 11:1121-07-14 14:17
Reporterduncanc 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version3.0.3 
Target Version3.0.XFixed in Version3.0.7 
Summary0016873: Batch processing forced when processing queue using browser
DescriptionWhen processing the message queue it appears that batch processing is forced even when MAILQUEUE_BATCH_SIZE is set to 0 in config.php. That was reported in the support forum http://forums.phplist.com/viewtopic.php?f=35&t=39581 [^]

There is some confusing code in admin/actions/processqueue.php
Line 97 has this commented-out block

## force batch processing in small batches when called from the web interface
/*
 * bad idea, we shouldn't touch the batch settings, in case they are very specific for
 * ISP restrictions, instead limit webpage processing by time (below)
 *
if (empty($GLOBALS['commandline'])) {
  $num_per_batch = min($num_per_batch,100);
  $batch_period = max($batch_period,1);
} elseif (isset($cline['m'])) {
  $cl_num_per_batch = sprintf('%d',$cline['m']);
  ## don't block when the param is not a number
  if (!empty($cl_num_per_batch)) {
    $num_per_batch = $cl_num_per_batch;
  }
  cl_output("Batch set with commandline to $num_per_batch");
}
*/

But then at line 118 is this code that forces a batch size of 10000

# in-page processing force to a minute max, and make sure there's a batch size
if (empty($GLOBALS['commandline'])) {
  $maxProcessQueueTime = min($maxProcessQueueTime,60);
  if ($num_per_batch <= 0) {
    $num_per_batch = 10000;
  }
}
Later at line 469 is this code that outputs a message about batch processing being enabled. This seems to depend on $reload, but it is difficult to figure out why that is related to batch processing.

if ($num_messages) {
  if (empty($reload)) {
    output($GLOBALS['I18N']->get('Processing has started,').' '.$num_messages.' '.$GLOBALS['I18N']->get('message(s) to process.'));
  }
  clearPageCache();
  if (!$GLOBALS["commandline"] && empty($reload)) {
    if (!$safemode) {
      output($GLOBALS['I18N']->get('Please leave this window open. You have batch processing enabled, so it will reload several times to send the messages. Reports will be sent by email to').' '.getConfig("report_address"));
    } else {
      output($GLOBALS['I18N']->get('Your webserver is running in safe_mode. Please keep this window open. It may reload several times to make sure all messages are sent.').' '.$GLOBALS['I18N']->get('Reports will be sent by email to').' '.getConfig("report_address"));
    }
  }
}

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0052264)
michiel (manager)
10-09-13 12:06

yes, I decided to do that with the new iframed page layout. Running the sending process in a loop makes more sense.

Is the problem the confusion that it says "You have batch processing enabled"?

Basically, the batch is set to activate the code that reloads the sending process.
(0052303)
duncanc (developer)
02-10-13 17:37

With phplist 2.10.x some people were able to kick-off processing the queue and then close the browser. Presumably their apache and php configuration allowed a long running process without being killed.

This is now not possible. I think that the "problem" was the reasonable expectation that after upgrading from 2.10 to 3 things would run as before.
(0052306)
michiel (manager)
02-10-13 21:22

hmm, even though it was a nice and funky hack, it was really not that great for the server. Also, it is not really reliable, because the process may get killed at any time by the server. I think it was not very popular with server admins.

But if there's a big call for it, I don't mind re-instating it. I just think people should send on commandline. There's no need to involve the Webserver Daemon in the process of sending.
(0052413)
mario (reporter)
07-11-13 15:25

Hello, how about batch mode on by default, if anybody wants it off then go and change it in the config file. You could add a few lines as a warning or reminder.
(0052415)
michiel (manager)
08-11-13 01:28


yes, that's a good idea actually. From all points of view, it'll be much better to use batch processing all the time. Only the power-users will not want to use it, and they will know how to switch it off.


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker