From: [EMAIL PROTECTED] Operating system: Redhat 7.2 PHP version: 4.0.6 PHP Bug Type: Reproducible crash Bug description: httpd threads hang with large data structures
I've had a lot of problems recently with PHP cleaning up properly after using large data structures. A sample script is included: $huge_array = array(); for ( $i=0 ; $i<= 8000 ; $i++ ) { foreach (array("cn" , "uid" , "sn" , "givenName" , "attr1" , "attr2" , "attr3") as $j ) { for ( $k=0 ; $k<= 50 ; $k++ ) { $huge_array[$i][$j][$k] = rand(0,10000)."value"; } } } The script executes normally, but the httpd thread remains afterwards, consuming memory and CPU. It appears to need a kill -9 to make it finally die. If enough of these are run, all of the child processes of apache get tied up, preventing it from serving any more requests. At this point the threads have to be killed and the server restarted. I've also encountered similar problems with storing the results of a large ldap_get_entries(), although the behavior of the above script suggests that the problem is not actually with the LDAP function. Reducing the size of the query incrementally reveals that there seems to be a "breaking point" where this behavior begins. httpd also logs that it has problems terminating its child processes: [warn] child process 9541 still did not exit, sending a SIGTERM I'm running php-4.0.6-7 under apache-1.3.20-16, all Redhat 7.2 RPMs, with the default configuration. -- Edit bug report at: http://bugs.php.net/?id=14303&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]