|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
troy Smarty n00b
Joined: 07 May 2003 Posts: 2
|
Posted: Wed May 07, 2003 5:45 pm Post subject: Infinite loop? |
|
|
Using Smarty 2.5.0-RC1 (Apache 1.3.26, PHP 4.1.2) we appear to be experiencing an infinite loop in the httpd process on occassion. The httpd process goes to 99% CPU utilization and server-status shows that the process just runs and runs writing data to the client. This will go on until we kill the process. This only happens when pages that use Smarty are requested.
I was wondering if anyone else had a similar experience or knew of a case where Smarty could get into an infinite loop once it's done with display().
I know, we're running an RC of Smarty and PHP is an old version, but aside from upgrading and hoping it works better, is there a way to track this down?
Thanks! |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Wed May 07, 2003 7:15 pm Post subject: |
|
|
First thing is first, upgrade to 2.5.0. I don't know of anything that might cause a loop in there, but certainly get to a stable version first.
Monte |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Wed May 07, 2003 11:09 pm Post subject: |
|
|
Quote: | Smarty 2.5.0-RC1 (Apache 1.3.26, PHP 4.1.2) |
Hmmm.
latest releases:
------------------
Apache : 1.3.27
PHP : 4.3.1
Smarty : 2.5.0
In all cases, the associated groups gave high reccomendations to upgrade to the latest versions, if only for security reasons.
What platform are you running this on? What other libraries are you using?
Now, as for the problem you mentioned, you should at MOST be getting script time-outs--PHP aborts long running scripts.
Quote: | knew of a case where Smarty could get into an infinite loop once it's done with display(). |
Did you say after display()? After display(), you're back into your code, so you may want to check there |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Thu May 08, 2003 11:38 am Post subject: |
|
|
Update: Might be unrelated, but I just noticed a similar problem when using persistent connections to a mysql db through the dbx module on a smarty site. I think this must be a dbx / mysql (4.1) problem. It was really bad with the PHP Accelerator active, but still had problems without it.
@Troy: does that sound familiar?? |
|
Back to top |
|
troy Smarty n00b
Joined: 07 May 2003 Posts: 2
|
Posted: Thu May 08, 2003 9:41 pm Post subject: |
|
|
I upgraded to Smarty 2.5.0 and just saw it happen again today. This specific server has been running with this same config for a long time (years?) without ever seeing this. Yeah, I realize it's not the absolute latest, some people don't have the luxury of upgrading all components every 2 weeks.
We recently used Smarty for 2 pages and the httpd process running indefinitely started the day the new pages went up and it only happens on the pages that use Smarty. So, I really suspect Smarty moreso than Apache or PHP. I also suspected PHP Accelerator (although it's been running fine for months as well) and turned it off to see if it stopped it, but it still happens. This is on Linux 2.4.18, btw.
server-status says W (Sending Reply). I'm sure PHP times out, but the httpd process itself just seems to run and never serves another request until it's killed. It will run for hours until it's killed.
Unfortunately, I can't reproduce it on other servers configured identically. The same URL works fine in my experience. I just notice the httpd process monopolizing the CPU once or twice a day.
Any other ideas? |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|