|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6122 JVM starts only on 3 requests per httpd
Submitted: 2000-08-12 07:41 UTC Modified: 2000-12-07 11:28 UTC
From: Assigned:
Status: Closed Package: *General Issues
PHP Version: 4.0 Latest CVS (12/08/2000) OS: Mandrake Linux 7.0
Private report: No CVE-ID: None
 [2000-08-12 07:41 UTC]
./configure --with-java --with-mysql --with-gd --with-apache=../apache_1.3.11 --enable-track-vars --enable-sysvshm --enable-bcmath --disable-debug --with-xml

Using Blackdown JDK 1.2.2

From php.ini:

Test script:
$system = new Java("java.lang.System");
print "Java version=".$system->getProperty("java.version")." \n";
print "Java vendor=".$system->getProperty("java.vendor")." <p>\n\n";
print "OS=".$system->getProperty("")." ".
$system->getProperty("os.version")." on ".
$system->getProperty("os.arch")." \n";

$formatter = new Java("java.text.SimpleDateFormat",
                      "EEEE, MMMM dd, yyyy 'at' h:mm:ss a zzzz");

print $formatter->format(new Java("java.util.Date"))."\n";

The first 3 runs of the above work as expected. The fourth run gives the 
error: Fatal error: Unable to create Java Virtual Machine in /home/torben/public_html/php3test/tj.html on line 2.

Setting MaxRequestsPerChild to < 3 in httpd.conf makes the problem go away, but this is obviously a suboptimal solution. :)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-13 20:34 UTC]
Three does seem like an abnormally low number...  I will take a look into it.

The design of ext/java is *not* to create a new JVM per request, but to create a single JVM per thread (which in Apache's case is per process).

For scalability and robustness, I recommend sapi/servlet.  I use Tomcat, which can be connected to Apache.  In such a configuration, there will only every be a single JVM, with multiple requests being handled on separate threads.
 [2000-11-08 18:51 UTC]
What's the status with this bug? Still valid?

 [2000-12-07 11:28 UTC]
Reopen, if this still happens when using latest snapshot

PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Dec 10 18:01:24 2019 UTC