Actually, the browser outputs every email sent, and
runs the following commands every 3,000 mailings:
so it's not the browser timing out
--- Bogdan Stancescu <[EMAIL PROTECTED]> wrote:
> Ok, I'm not positive I'm right here, but have you
> thought about the
> browser timing out - and not PHP? You may try doing
> an echo(" "); and a
> flush(); every 100 e-mails or so - and reset max
> exec time to a
> reasonable duration while you're at it - that
> *might* fix it. Please
> note that executing set_time_limit() also resets the
> timer, so
> set_time_limit(20) every 100 e-mails should be more
> than enough.
> Daren Cotter wrote:
> > I have a PHP script that queries a MySQL database,
> > retrieves email addresses, and sends an email to
> > members of a website.
> > The problem is this: the PHP script times out
> > sending about 5,000 mailings, and I have to
> restart it
> > 10 times in order to mail the entire list!
> > This is an ongoing problem I have had for almost a
> > year now. I have tried MANY things to make this
> > better, which I have outlined below:
> > 1) Upped the Max Excecution Time in PHP from 30 to
> > ridiculously high 300 (is this a security issue?)
> > 2) Upped the Max amount of memory a PHP script can
> > have from 8mb to 16mb
> > 3) Running sendmail in "deferred" mode instead of
> > "background" mode, and processing the mail queue
> > 5 minutes instead of the default 1 hour.
> > Results:
> > 1) The script runs much longer, but still times
> > (One thing I want to make clear, even when max
> > execution time is 30 seconds, the script does not
> > after 30 seconds, maybe it just means 30 seconds
> > inactivity?)
> > 2) I have no idea if this is making a difference
> > not, does anyone know?
> > 3) Since this means mailings get sent right into
> > queue, and not sent right away, the HTTP interface
> > runs 10 times faster. This would be a GREAT
> > for me, but it has one drawback: when a user signs
> > for the site, their confirmation email must be
> > immediately...it cannot sit in the queue until the
> > next time the queue is processed (at most 5
> > So, I figure I have two options. Leave sendmail as
> > to deferred, process the queue every so often, but
> > find a way to have the confirmation emails sent
> > immediately. This is really the option I want to
> > The sendmail version I have (latest version), has
> > separate mail queues. Does anyone know how to use
> > to stipulate that some mailings get sent
> > while others are just queued until the next queue
> > Otherwise, I have to set the delivery method of
> > sendmail back to background, have mailings take 10
> > times as long from the HTTP interface, and try and
> > find some way from keeping the script from timing
> > and having to restart the mailing.
> > ANY HELP is greatly appreciated!
> > BTW, the server is loaded, dual proc, gig of ram,
> > etc...more hardware has not helped the problem.
> > __________________________________________________
> > Do You Yahoo!?
> > HotJobs - Search Thousands of New Jobs
> > http://www.hotjobs.com
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php