php-developer-list | 2000111
Date: 11/08/00
- Next message: sniper <email protected>: "[PHP-DEV] PHP 4.0 Bug #6205 Updated: "Parse error:" pages are cached"
- Previous message: sniper <email protected>: "[PHP-DEV] PHP 4.0 Bug #6314 Updated: unable to retrieve files on uploading with their full size."
- Next in thread: Lars Torben Wilson: "Re: [PHP-DEV] PHP 4.0 Bug #6122 Updated: JVM starts only on 3 requests per httpd"
- Reply: Lars Torben Wilson: "Re: [PHP-DEV] PHP 4.0 Bug #6122 Updated: JVM starts only on 3 requests per httpd"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ID: 6122
Updated by: sniper
Reported By: torben <email protected>
Status: Feedback
Bug Type: *General Issues
Assigned To:
Comments:
What's the status with this bug? Still valid?
--Jani
Previous Comments:
---------------------------------------------------------------------------
[2000-08-13 20:34:19] rubys <email protected>
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-08-12 07:41:17] torben <email protected>
./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:
[java]
java.class.path=/usr/local/lib/php_java.jar
extension_dir=/usr/local/lib/php/extensions/no-debug-non-zts-20000809
extension=libphp_java.so
java.library.path=/usr/local/jdk1.2.2/jre/lib/i386:/usr/local/jdk1.2.2/jre/lib/i386/native_threads:/usr/local/jdk1.2.2/jre/lib/i386/classic:/usr/local/lib/php/extensions/no-debug-non-zts-20000809
Test script:
<?php
$system = new Java("java.lang.System");
print "Java version=".$system->getProperty("java.version")." n";
print "Java vendor=".$system->getProperty("java.vendor")." <p>nn";
print "OS=".$system->getProperty("os.name")." ".
$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. :)
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=6122
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: sniper <email protected>: "[PHP-DEV] PHP 4.0 Bug #6205 Updated: "Parse error:" pages are cached"
- Previous message: sniper <email protected>: "[PHP-DEV] PHP 4.0 Bug #6314 Updated: unable to retrieve files on uploading with their full size."
- Next in thread: Lars Torben Wilson: "Re: [PHP-DEV] PHP 4.0 Bug #6122 Updated: JVM starts only on 3 requests per httpd"
- Reply: Lars Torben Wilson: "Re: [PHP-DEV] PHP 4.0 Bug #6122 Updated: JVM starts only on 3 requests per httpd"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

