ID:               28914
 Updated by:       [EMAIL PROTECTED]
 Reported By:      bens at effortlessis dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Mail related
 Operating System: Red Hat FC1
 PHP Version:      4.3.7
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

This is a problem with your mailserver. It slows down with 
large number of e-mails in the queue and eventually the 
browser timesout because it takes too long to get the 
output. You may want to monitor your e-mail log and the 
server load while running the script to determine the cause 
of the slowdown. 


Previous Comments:
------------------------------------------------------------------------

[2004-06-25 01:05:19] bens at effortlessis dot com

Description:
------------
When used repeatedly, in a loop, mail() will often hang causing the
script and/or browser to timeout. Sometimes the script will continue to
execute after the browser times out, causing all sorts of grief. 

I've tested this on numerous (RedHat 7.x through RH FC1) servers, and
have seen the same issue since at least PHP 4.2.x. 

(Just crossed my mind to report this as a bug!) 

Reproduce code:
---------------
<?
set_time_limit(0); 
$header="From: [EMAIL PROTECTED]"; 
$sql="SELECT email FROM list ORDER BY email ASC"; 
if ($res=pg_exec($dbconn, $sql)) 
 while ([EMAIL PROTECTED]($res)) 
  { 
  echo $row['email']."<BR>\n"; 
  mail($row['email'], 'Mailing List News', $msg, $header); 
  } 
?>

Expected result:
----------------
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED] 
... 10,000 times. 

Actual result:
--------------
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED] 
... typically less than 100 times, and then browser times out. 


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=28914&edit=1

Reply via email to