php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20270 Apache processes don't clean up
Submitted: 2002-11-05 18:20 UTC Modified: 2002-12-04 02:18 UTC
Votes:3
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:2 (66.7%)
From: luci at conexim dot com dot au Assigned:
Status: Closed Package: Java related
PHP Version: 4.3.0-pre2 OS: RHL7.3
Private report: No CVE-ID: None
 [2002-11-05 18:20 UTC] luci at conexim dot com dot au
I have tried to use the Java extension with JDK1.4.1 and PHP 4.2.3 and 4.3.0-pre2.

Each time a page with embedded Java runs, the Apache (1.3.27) spawns MaxSpareServers processes, which never seem to get cleaned up.

The tests I conducted with 4.2.3 ended up crashing after a few runs, being unable to run the JVM. This version also had trouble reading php.ini class path settings.

The 4.3.0-pre2 seems to stop spawning processes after reaching about 90 httpds (not sure what this number is related to). The execution time of the code is much faster after the spawning stops also - probably the JVMs are loaded for all httpds?

Is there a way to control this process spawning and to get the whole thing more stable?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-14 08:57 UTC] tjw at webteam dot net
There seems to be a problem with the way threads are handled between php and java that keeps the apache child process from cleaning up after itself.  If MaxRequestsPerChild is set to anything other than 1, a number of threads are started by a httpd child and are never reused.  It also appears that the httpd child process that spawns these threads can not be reused by apache and the httpd controlling process never starts another child process to take the place of the disabled one.

My testing setup is:
Linux 2.4.18
glibc 2.2.5
apache 1.3.27
libpthread 0.9
php 4.2.3

Blackdown JDK 1.3.1, IBM JDK 1.3..1, Blackdown JDK 1.4.1b2 all produce the same results.

It should be noted that apache is stable if MaxRequestsPerChild is set to 1, but there's quite a performance hit involved.
 [2002-11-22 13:11 UTC] tjw at webteam dot net
I get the same result using:

Linux 2.4.19
glibc 2.3.1
pthread 0.10
php 4.3.0RC1
apache 1.3.27
Sun's j2sdk1.4.0_03
 [2002-11-28 07:10 UTC] chregu@php.net
Do you have xslt support enabled, then

sablotron < 0.97 and jdk >= 1.3 does not work together.
Sablotron 0.97 is not out yet, but there is an RC1 in their CVS (didn't find a link to download it), which should solve the problem..

chregu




 [2002-12-04 02:18 UTC] sebastian@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 09:01:27 2024 UTC