I don't know... this looks like some mail server is greylisting¹ your connections and you have to wait to deliver this message and make more connections to it. As Peter said, probably your mail server is looking like a spam engine. 1 - Greylisting puts your email in a queue and tells you have to ask again to send it in X minutes. It's great for blocking spam, as they send only once and forget about it. The amount of time to wait is configurable, perhaps a admin set it too high. Atenciosamente, www.softpartech.com.br Thiago Henrique Pojda Desenvolvimento Web +55 41 3033-7676 thiago.pojda@xxxxxxxxxxxxxxxxxx Excelência em Softwares Financeiros -----Mensagem original----- De: Peter Ford [mailto:pete@xxxxxxxxxxxxx] Enviada em: terça-feira, 13 de maio de 2008 07:42 Para: php-general@xxxxxxxxxxxxx Assunto: Re: Scripts slowing down? René Leboeuf wrote: > Hi. > > I'm running a large website. I have some mailing scripts that take days > to run. > > I noticed these scripts slow down with time, sometimes going to an > almost complete stop (no mail sent for several minutes). > > The source code is trivial and can't contain a loop. I monitored the > memory usage and couldn't find a memory leak. Using APD, most of the > time is reported to be spent in the fgets() function (script waiting for > a sendmail reply). But sendmail still replies swiftly when this problem > occurs. By this, I guesss you mean that other connections to sendmail reply swiftly: so the server is not just jamming up completely and refusing requests ? It might depend on the exact implementation of 'sendmail': for example, the Courier mail system which I use replaces the program 'sendmail' with it's own binary to do the job. Courier also has a 'tar-pitting' feature which is triggered by behaviour that looks like a spammer is trying to relay stuff: it atificially slows the response to the send requests if there is an unreasonably high rate of requests coming from a given source. At least that's how I understand the feature to work. Other mail system may implement a similar feature - it might just be that your mailing script looks like a spam engine to the mail server. > > Restarting sendmail has no effect on these scripts. Restarting the > scripts makes them run like hell for some hours, until the problem rises > again. > > I'm using PHP 5.2.5 > > I don't know where to look next for the source of this problem... I think you need to provide some more detail - you could start by explaining what method you use to send the messages. The next thing to do is to look at the mail logs and see if there are any messages written around the time that yourt script runs. Don't always assume that it is your code that is wrong (that's what managers are for) -- Peter Ford phone: 01580 893333 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php