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

From: Date: Thu, 06 Sep 2001 23:35:06 +0000
Subject: Re: Sending Broadcast Email - will a large loop cause a crash?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-66289@lists.php.net to get a copy of this message
Well, try it - find a willing victim and just do a simple loop. Alternately, set up an account with a local, high-bandwidth ISP, batch in groups of 330-, and use BCC. Miles At 04:16 PM 9/6/01 -0700, Fotwun wrote:
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


« previous php.general (#66289) next »