Re: Sending Broadcast Email - will a large loop cause a crash?

From: Date: Fri, 07 Sep 2001 07:55:29 +0000
Subject: Re: Sending Broadcast Email - will a large loop cause a crash?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-66353@lists.php.net to get a copy of this message
Also remember PHP has a maximum execution time (normally 30 seconds) so you will need to overwrite when running the script. ----- Original Message ----- From: "Kath" <kath@kathweb.net> To: "Fotwun" <fotwun@softhome.net>; <php-general@lists.php.net> Sent: Friday, September 07, 2001 12:39 AM Subject: Re: [PHP] Sending Broadcast Email - will a large loop cause a crash? > Whats your time frame for deployment of the email? > > You might want to stagnate it out... like loop through 100, pause for 10 > secs, do the next 100, pause, repeat. Maybe longer if you could. > > You could always have it record the number, stop it and adjust higher/lower > as required. > > Also, make sure that you are able to tell what emails are kicked back and > logged as not being received (User not found, other kind of error in > sending). > > Please let us know what happens, it would be excellent reference. > > - k > > ----- Original Message ----- > From: "Fotwun" <fotwun@softhome.net> > To: <php-general@lists.php.net> > Sent: Thursday, September 06, 2001 7:16 PM > Subject: [PHP] Sending Broadcast Email - will a large loop cause a crash? > > > > Hi, > > > > I need to send a broadcast email to our customers (about 3,000 emails). > The > > data is being drawn for the DB, and will be personalized. Obviously, the > > code to do this is only a few lines. However, I am concerned with the load > > it will put on the system trying to loop through and mail() 3,000+ times. > > Because of the overhead I anticipate this will cause the server, I am > > planning to do it late in the evening. > > > > My concern is this... will such a loop calling mail() cause PHP/Apache/the > > box/etc to crash under normal circumstances? We have a pretty beefy box, I > > just have never tried broadcasting through PHP. Also, if there is any > > reasonable chance for such a failure, is it possible to put timed pauses > in, > > say half a second or so before it continues the loop. I've never heard of > > inserting pauses into the execution of PHP code, not sure if its possible. > > If it were, I would think this could combat some of the load, and prevent > > the bottleneck from building backlog until failure. > > > > Who knows, maybe this type of routine won't even make my box flinch > (P3-833, > > FreeBSD, 256 megs), that's why I'm asking ahead of time. I'd hate to see a > > crash, mainly because I'll have no idea where it left off, and will end up > > sending 2 or more emails to some people if I have to run it more than > once. > > > > Thanks. > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#66353) next »