[solved] A process for this page is already running

Solutions for other phpList version 2 users
Forum rules
Please do not ask questions here, this is for Solutions you have discovered or come across.

[solved] A process for this page is already running

Postby ericltb » 7:26am, Mon 10 Sep, 2007

I got these error messages in my event log:

Sleeping for 20 seconds, aborting will quit

A process for this page is already running and it was still alive 7 seconds ago

What does it means?

My code:

define("MAILQUEUE_BATCH_SIZE",0);

define("MAILQUEUE_BATCH_PERIOD",3600);

define('MAILQUEUE_THROTTLE',8);

My cron is set every 5 mins, it will reload.

Any conflicting configuration btwn my cron and batch?

Thanks :)
ericltb
phpLister
 
Posts: 10
Joined: 7:25am, Fri 24 Aug, 2007

Re: A process for this page is already running

Postby H2B2 » 12:41pm, Mon 10 Sep, 2007

ericltb wrote:A process for this page is already running and it was still alive 7 seconds ago
It's not a conflict with your batch settings given that you disabled batch processing (set to 0), which seems fine considering that your throttle setting of 8 seconds will limit the number of messages going out to approximately 450 messages per hour.

Anyway what this message says it that your cron is trying to process the mailqueue while it is already being processed, i.e. the previous process is still active. It waits a while to check whether the previous process stops. If not, it quits gracefully, and lets the previous process continue running.

You might consider setting your cron to execute with a bigger interval, e.g., if your server is running PHP-cgi you could execute the cron every 15 or 20 minutes. If you have PHP-cli, you could run the cron every hour for instance. You may still get this warning message, but less frequently.
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Re: A process for this page is already running

Postby MarkA. » 2:45am, Wed 24 Jun, 2009

Hi H2B2,

I am no expert with phplist, although I've been using it successfully for about 8 years or possibly longer. This information below is probably quite trivial to expert users of phplist, but it was something of an epiphany to me, so I thought you may like to read about my experience.

What I 'think' I have finally figured out is this. My ISP allows me to send 500 messages per hour. Recently I changed my throttle settings to:
define("MAILQUEUE_BATCH_SIZE",25);
define("MAILQUEUE_BATCH_PERIOD",25);
define('MAILQUEUE_THROTTLE',1);

and previously I had everything above the same, except:
define("MAILQUEUE_BATCH_SIZE",20);
define("MAILQUEUE_BATCH_PERIOD",3600);

My cron is set to fire every 2 minutes.

I was very upset to see the dreaded

"Sleeping for 20 seconds, aborting will quit " until it dawned on me that

I looked at the phplist - log of events and this is what I noticed:

at 07:08 there were 799 emails to process

at 07:48 there were 299 to process and that's when the "Mailer Error: Could not instantiate mail function" began and the sleeping for 20 seconds began and ran again until

at 08:08 the sending began again and there were 299 to process

meaning that once PHPlist reached the 500 emails sent and my ISP blocked any further emails during that hour long period, phplist would continue to be blocked from sending emails until the next hour period begins

and my ISP having set my maximum limit per hour at 500, this all makes total sense. As it states in the config.php

# Please note, the following two values can be overridden by your ISP by using
# a server wide configuration. So if you notice these values to be different
# in reality, that may be the case


so again this all makes sense.

I am posting this here because for quite a few years I thought when I received the "Mailer Error: Could not instantiate mail function" that there was a problem with the program or with phplist, but this seems to not be the case and it's just my ISP blocking any more emails over the maximum setting per hour.

All the best,
Mark :-)
A. Mark Argentino, P.Eng., Broker
http://www.mississauga4sale.com
MarkA.
PL Geek
 
Posts: 80
Joined: 1:36pm, Thu 17 Feb, 2005
Location: Mississauga, Ontario, Canada

Re: A process for this page is already running

Postby H2B2 » 9:05am, Thu 25 Jun, 2009

Thx for the feedback! :D
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006


Return to Answers, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 1 guest