Click to See Complete Forum and Search --> : IIS 5.0 PHP scripts not completing


matt_l
09-28-2001, 09:07 AM
Hi,

I wonder if anyone might be able to help me with this, or point me in the right direction:

I have inherited a web site which runs on two load balanced Win 2K/IIS 5.0 servers running PHP 4.06?

After around 4 days of operation the servers quit serving pages and complain about lack of virtual memory. An inspection of the running processes shows dozens of PHP scripts are still running (even though the script timeout is set to 30 sec) but appear to have taken no CPU time, just around a meg each of memory. A re-boot resolves the problem and the event log shows lots of occurrences of the W3SVC reporting:
\"The script started from the URL \'/search/keywords.php\' with parameters \'id=12465835&keyword=minidisc\' has not responded within the configured timeout period. The HTTP server is terminating the script\"

Are there likely to be any major errors in the code on these pages (there are many scripts affected, not every request for the page causes this behaviour) that would cause this kind of behaviour?

Can you tell this PHP newbie how to dump any good debug info to a log (not the screen - it\'s a live server!)?

I\'ve looked for obvious stuff like possible infinte loops occuring but nothing jumps out at me with my limited PHP experience.

Many thanks,

Matt.

puremourning
09-28-2001, 03:08 PM
An idea might be to open up a command prompt on the sever and run C:\PHP\PHP.exe C:\path\to\my\php.php

obviously changing the paths accordingly, and then run Task Manager, to see if php.exe has closed correctly, this will rule out a problem with the php.exe...

BTW: i run PHP on IIS 5.0 and it works perfectly :-/

Ben Jackson

Anon
09-28-2001, 07:21 PM
Let me guess... Connections and timeouts are probably not being handled correctly. For example, if a user abnormally disconnects before the script is finished running, their process is left laying around. You wouldn't be able to detect this from the command-line.

Check out http://www.php.net/manual/en/features.connection-handling.php

Let me know if it helps resolve the problem.

-- Michael
Darkstreak Computing & Innovations
www.darkstreak.com

mithril
09-28-2001, 11:08 PM
There is a directive in php.ini called error_log which allows you to specify a file to log script errors to. There are a copy other error reporting directives in the general area of php.ini, but that's probably the one of most use to you. HTH.

geoff

matt_l
10-01-2001, 06:13 AM
Thankyou all for your help!

If I cure the problem and if anyone is interested I\'ll post my results here...

Thanx again!

Matt.

Anon
01-16-2002, 09:57 AM
Have you got any further this problems. I need some help and would be very grateful.

Thanks in advance

Anon
02-27-2002, 11:03 AM
Pls post your results... i have a similar problem. thanks.

Anon
02-27-2002, 11:21 AM
I've had no luck other than running the website in high isolation mode in IIS. I now only get about 1 of these timeouts/day and no clashing with other websites on the server.

I have not run through the suggested investigation here, e.g. logging to the php err log file to establish what/where the script caused a timeout.

when I get a chance, I will run through the process of invesgating and post my results here.

Anon
03-14-2002, 07:04 PM
The same problem here, I'm looking for a solution if I found something I'll post here.