php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37591 PHP MEM and CPU resource management
Submitted: 2006-05-25 16:29 UTC Modified: 2006-05-26 06:37 UTC
From: msho at exabytes dot com Assigned:
Status: Not a bug Package: IIS related
PHP Version: 4.4.2 OS: Windows 2003
Private report: No CVE-ID: None
 [2006-05-25 16:29 UTC] msho at exabytes dot com
Description:
------------
When adding PHP Engine mapping to IIS with "Verify that file exists" option turned off, IIS will execute PHP engine to serve the requested php file (not matter the file is exist or not exist).

PHP loaded with certain amount of memory usage which will be in deep trouble if there is a lot of request to an invalid files via http.

To have this issue reproduce:
1. Mapped the PHP engine to IIS with "Verify that file exists" option turned off.

2. Setup a normal php script that query on the webserver for an invalid php file via http infinitely, for example:
   
   http://<server_ip>//<invalid_path>

3. Run multiple (more than 100) instances at a time for the same script.

The sample script on requesting the script infinitely can be retrieved on the "Reproduce code" section.

Reproduce code:
---------------
<?

while(1)
{
   $request_url = "<enter_the_url_here>"; //eg. http://<server_ip>//<invalid_path>
   $temp = file($request_url);
   unset($temp);
}

?>

Expected result:
----------------
You will see the CPU usage and MEM usage will shoot on the Windows webserver.

Actual result:
--------------
It will be great if PHP can reduce the CPU and MEM usage when dealing with the invalid file request via http.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-26 06:37 UTC] tony2001@php.net
You configured your IIS to run PHP on every requestm but you didn't really want that?
That doesn't make any sense and I don't see how it is PHP problem.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 15 17:01:33 2024 UTC