[SOLVED] your "perpetual while() loop" suugestion

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
phait
Forum Commoner
Posts: 46
Joined: Wed Apr 07, 2004 4:41 am
Location: watford / leicester, UK

[SOLVED] your "perpetual while() loop" suugestion

Post by phait »

hi,

Your suggestion talks of a perpetual while loop running in the background and sleeping for a few seconds after every loop when sending a large batch of emails.

I am curious how you get around the timeout / execution settings in php.ini if it is running perpetually? .. or have I misunderstood (quite possibly)?

I'm thinking of options like:
max_execution_time;
max_input_time;
(and possibly) default_socket_timeout.

All have values set and you have to modify them, obviously you need to know how to long to extend them, but if the loop is perpetual then how do you get around this?

I've had some problems with scripts timing out when sending large batches and so I'm very curious :)

cheers,
paul
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Don't ever try this from a web browser though.... it will have to be invoked from the command line ;)
phait
Forum Commoner
Posts: 46
Joined: Wed Apr 07, 2004 4:41 am
Location: watford / leicester, UK

Post by phait »

@feyd
GAH! of course, I'd totally forgotten about this option and now I recall that I was using that a couple of years ago to solve a similar problem. What a doofus I am! Thanks for the reminder.

@d11wtg
yup. no problems there.

thanks for the replies.

paul.
Post Reply