Re: [PHP] Scripts slowing down?

2008-05-14 Thread René Leboeuf

Per Jessen a écrit :

René Leboeuf wrote:


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.


It sounds like you are using SMTP to talk directly to your sendmail
daemon? 


Yes, SMTP code is provided by phpmailer.





Restarting sendmail has no effect on these scripts. Restarting the
scripts makes them run like hell for some hours, until the problem
rises again.


So, if there is no loop in your script, what _does_ it contain? 


Oops... The code can't contain a INFINITE loop... Of course, there is a 
loop through all the members!





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



Re: [PHP] Scripts slowing down?

2008-05-13 Thread Per Jessen
René Leboeuf wrote:

 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.

It sounds like you are using SMTP to talk directly to your sendmail
daemon? 

 Restarting sendmail has no effect on these scripts. Restarting the
 scripts makes them run like hell for some hours, until the problem
 rises again.

So, if there is no loop in your script, what _does_ it contain? 


/Per Jessen, Zürich


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



[PHP] Scripts slowing down?

2008-05-13 Thread René Leboeuf

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.

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...

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