Re: [PHP] Broken pipes, time outs, PHP, and mail

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Could it be that there are connection limits on the remote server?

Thanks,
Ash
http://www.ashleysheridan.co.uk

----- Reply message -----
From: "Bob McConnell" <rvm@xxxxxxxxx>
Date: Wed, Sep 8, 2010 18:24
Subject: [PHP] Broken pipes, time outs, PHP, and mail
To: <php-general@xxxxxxxxxxxxx>

From: Dave M G

> I have a set of scripts that sends out emails to a list of about 150 
> people. Sometimes it works fine.
> 
> Other times, it dies part way through the list, and in my error logs I

> get this output:
> 
> fputs() [<a href='function.fputs'>function.fputs</a>]: send of 22
bytes 
> failed with errno=32 Broken pipe /public_html/class.smtp.php 489
> 
> The code that sends the mail is derived from here:
> http://www.phpclasses.org/browse/file/920.html
> 
> It's mostly rock solid code, so far as I know, so I suspect the
problem 
> to more with my server settings or something.
> 
> That said, I don't know what differentiates a failed mailing and a 
> successful one.
> 
> After a Google search, it seems "broken pipes" are a matter of time 
> outs. That's about as far as I understand it, though.
> 
> Can anyone throw me a tip as to how I might diagnose this problem?

"Broken pipe" is a euphemism for "Network error". There are any number
of causes including the remote server closing the socket, a switch or
hub between here and there is bogged down by backup traffic, or a
segment your connection passes through became too busy with higher
priority video traffic. The actual details are difficult to determine
and none of the administrators involved will ever admit they had a
problem. In most cases the TCP/IP error will simply tell you it timed
out waiting for a response. Your code should be able to re-open the
connection at this point and resend the message that triggered the
error. Then resume working on the rest of your list.

Bob McConnell

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux