ID: 22721 Updated by: [EMAIL PROTECTED] Reported By: shawn at rumental dot com -Status: Open +Status: Assigned Bug Type: Performance problem Operating System: win2k -PHP Version: 4.3.2 +PHP Version: 4.3.2-RC Assigned To: wez
Previous Comments: ------------------------------------------------------------------------ [2003-03-26 18:47:28] shawn at rumental dot com afer running file() about a 2000 times with latest snapshot in win2k running apache 1.3.27 latest win32 binary i get this error: Warning: file(e:\test.txt): failed to open stream: Too many open files in e:\program files\apache group\apache\htdocs\test\testfile2.php on line 12 I used handle.exe from sysinternals to view open file handles http://www.sysinternals.com/ntw2k/freeware/handle.shtml and all file handles opened via file() appear to still be open. This is not the case when testing php 422 output from handle.exe: Apache.exe pid: 1640 MAINFRAME\apache 1e4: File E:\test.txt 1e8: File E:\test.txt 210: File E:\test.txt ... etc 214: File E:\test.txt and it goes on for the number of times file() accessed the file. CODE ---- $i=1; while($i++ <="2000"){ file("e:\\test.txt"); } ------------------------------------------------------------------------ [2003-03-25 18:59:20] [EMAIL PROTECTED] What is the problem? We need a script to reproduce the problem, along with a description of what should happen, what does happen and why you think it is wrong. ------------------------------------------------------------------------ [2003-03-25 18:49:18] shawn at rumental dot com IS THIS BUG STILL BEING WATCHED. I reopened it there still seems to be a problem with the fix. ------------------------------------------------------------------------ [2003-03-20 21:04:25] shawn at rumental dot com BIG PROBLEM! it seems as though opened files via file() are staying open and preventing service from openeing new files giving errors. I checked this with sysineternals utility called handle ------------------------------------------------------------------------ [2003-03-19 19:11:26] shawn at rumental dot com Benchmarking PHP 4.3.2-RC Testing file() with 10 iterations with file size: 4096226 file_test(10): 0.8426 secs WORKS GREAT ! ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/22721 -- Edit this bug report at http://bugs.php.net/?id=22721&edit=1
