|
From: <php...@li...> - 2007-10-30 15:31:25
|
Hi, after some upgrades on my server I've run into problem with php-java-bridge. When java bridge is in use, many connections are becoming stuck in state "Closing connection" state (determined via apache server-status) This appears only under heavy load. Environment: Gentoo linux Apache tested 2.0.58-r2, 2.0.59-r5, 2.2.6 PHP 5.2.4_p20070914-r2 JavaBridge 4.0.1 4.3.0 JRE Sun 1.5.0_13 Steps to reproduce: Install apache, php, javabridge. Simple configuration for JavaBridge: # cat /etc/php/apache2-php5/ext-active/java.ini extension=java.so [java] java.log_level="50" java.log_file="/tmp/php-java-bridge.log" I have running keepalived against server for server failure detection (about 1req/s) + I run ab2 -c 50 -n 100000 http://172.31.32.40/keepalived/status.htm to generate some load. When JavaBridge is disabled (remove extension=java.so) everything works fine. But when I turn JavaBridge on, many connections are becoming stalled in state "Closing connection": Server uptime: 12 minutes 53 seconds Total accesses: 102628 - Total Traffic: 23.7 MB CPU Usage: u14.24 s10.53 cu0 cs0 - 3.2% CPU load 133 requests/sec - 31.4 kB/second - 241 B/request 60 requests currently being processed, 9 idle workers CCCCCCCCCCCCCCC_CCCC_CCCCCCC_C_CCCCC_CCCCCCCCCCCCC_CC__CCCCCCC_W CCCCC........................................................... ................................................................ ................................................................ Scoreboard Key: "_" Waiting for Connection, "S" Starting up, "R" Reading Request, "W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup, "C" Closing connection, "L" Logging, "G" Gracefully finishing, "I" Idle cleanup of worker, "." Open slot with no current process Really strange is that I'm performing these tests on STATIC html file. Thus PHP or JavaBridge should not be involved Only thing what came onto my mind was JavaBridge has small thread pool. I've increased thread pool value from default 20 up to 200. Same effect. JavaBridge log: # cat /tmp/php-java-bridge.log Oct 26 15:26:10 VMBridge INFO : VM : 1.5.0_13@http://java.sun.com/ Oct 26 15:26:10 VMBridge INFO : VMBridge version : 4.3.0 Oct 26 15:26:10 VMBridge INFO : logFile : /tmp/php-java-bridge.log Oct 26 15:26:10 VMBridge INFO : default logLevel : 50 Oct 26 15:26:10 VMBridge INFO : socket : INET_LOCAL:9267 Oct 26 15:26:10 VMBridge INFO : java.ext.dirs : /opt/sun-jdk-1.5.0.13/jre/lib/ext Oct 26 15:26:10 VMBridge INFO : php.java.bridge.base: /usr/lib64/php5/lib/php/extensions/no-debug-non-zts-20060613 Oct 26 15:26:10 VMBridge INFO : extra library dir : /usr/lib64/php5/lib/php/extensions/no-debug-non-zts-20060613/lib Oct 26 15:26:10 VMBridge INFO : thread pool size : 200 Oct 26 15:26:10 VMBridge DEBUG: Starting to accept Socket connections What do you think? Is there anything I can try? Is this a bug? Feature? Or design philosophy? Thank you for your answers. Best regards, -- Martin Filip e-mail: ne...@sm... jabber: ne...@sm... www: http://www.smoula.net _________________________________________ < BOFH Excuse #7: poor power conditioning > ----------------------------------------- \ ,__, \ (oo)____ (__) )\ ||--|| * |
|
From: <php...@li...> - 2007-10-31 08:08:33
|
Hi, as a workaround please do not use the java.so. Please use the pure Java implementation and "Java.inc" instead. It is about 30% faster if the PHP accelerator is enabled. Can you please open a problem report (please use http://sourceforge.net/tracker/?func=add&group_id=117793&atid=679233)? Please attach a test case which allows us to reproduce this problem with the java.so. BTW: Andre, what about removing the C code "java.so" entirely? Regards, Jost Boekemeier __________________________________ Ihr erstes Fernweh? Wo gibt es den schönsten Strand? www.yahoo.de/clever |
|
From: <php...@li...> - 2007-11-07 11:49:19
|
Hi, > as a workaround please do not use the java.so. > > Please use the pure Java implementation and "Java.inc" instead. It is about 30% faster if > the PHP accelerator is enabled. I've installed tomcat and using JavaBridge against it. It looks fine now. But I don't like the idea of including remote file "Java.inc". Is there some way to get things working without this? > Can you please open a problem report (please use > http://sourceforge.net/tracker/?func=add&group_id=117793&atid=679233)? Please attach a test case > which allows us to reproduce this problem with the java.so. I'm still not absolutely sure WHAT produces this problem. May be it's problem with some patch used in Gentoo distribution. I'll try this on pure vanilla apache + php system this weekend and let you know. -- Martin Filip e-mail: ne...@sm... jabber: ne...@sm... www: http://www.smoula.net ______________________________________ / BOFH Excuse #262: Our POP server was \ \ kidnapped by a weasel. / -------------------------------------- \ ,__, \ (oo)____ (__) )\ ||--|| * |
|
From: <php...@li...> - 2007-11-07 12:35:16
|
Hi,
> I've installed tomcat and using JavaBridge against it. It looks fine
> now. But I don't like the idea of including remote file "Java.inc". Is
> there some way to get things working without this?
Just copy Java.inc into the PHP "include_path".
> I'm still not absolutely sure WHAT produces this problem.
The java.so (or php_java.dll) starts a Java process as a Apache- or IIS sub process.
Some development versions of PHP do not call mshutdown(), so that Apache waits for the
sub process forever. The PHP developers usually detect these problems before each PHP release.
However, it is a good idea to start Java outside of the HTTP domain, anyway.
Regards,
Jost Boekemeier
Heute schon einen Blick in die Zukunft von E-Mails wagen? Versuchen Sie´s mit dem neuen Yahoo! Mail. www.yahoo.de/mail
|
|
From: <php...@li...> - 2007-11-03 17:37:39
|
Hi,
I am sorry, but I could not reproduce this problem on RedHat Fedora or Ubuntu/Debian Linux.
[PHP mshutdown() procedure not called on a non-standard PHP installation]
> Gentoo linux
> PHP 5.2.4_p20070914-r2
If you use a non-standard PHP installation, please use the pure Java implementation and the
Java.inc instead. Or please report these problems to your OS vendor.
Regards,
Jost Boekemeier
__________________________________ Ihre erste Baustelle? Wissenswertes für Bastler und Hobby Handwerker. www.yahoo.de/clever
|