From: <php...@li...> - 2007-02-13 01:09:35
|
Hello, First have been really impressed with PHP/Java Bridge. It is fast and pretty easy to use. I am using version 4.0.1 with PHP 5.0.5, IBMJava2-142, and Lucene 1.4.3. I am suffering from what appears to be a memory leak happening somewhere in the java bridge. The symptoms are that system memory resources gradually drop over several hours until Apache quits responding and has to be restarted. At this point there is usually a single instance of apache that must be kill -9'ed. I am trying to enable logging to see if this sheds any light on the problem by adding: java.log_file="/tmp/bridgelog" java.log_level="6" to the php.ini file. This does result in information being placed in the log but when this setting is turned on I get this in the log: Feb 12 15:26:00 JavaBridge DEBUG: 169c14a7@5c2554a7 Request from client with uid/gid -1/-1 Feb 12 15:26:00 JavaBridge DEBUG: 169c14a7@5c2554a7 --> <C v="org.apache.lucene.search.IndexSearcher" p="I" i="a48a0ec" > Feb 12 15:26:00 JavaBridge DEBUG: 169c14a7@5c2554a7 --> <S v="/home/httpd/port8095/www.utcle.org/www/htdocs/../../../lucene_index" /> Feb 12 15:26:00 JavaBridge DEBUG: 169c14a7@5c2554a7 --> </C> Feb 12 15:26:00 JavaBridge DEBUG: DynamicClassLoader(1545786535).loadClass(org.apache.lucene.search.IndexSearcher) Feb 12 15:26:00 JavaBridge DEBUG: Trying parent Feb 12 15:26:00 JavaBridge ERROR: An exception occured: java.lang.ClassNotFoundException: Could not find org.apache.lucene.search.IndexSearcher in java_require() path. Please check the path and the SEL and File permissions. java.lang.ClassNotFoundException: Could not find org.apache.lucene.search.IndexSearcher in java_require() path. Please check the path and the SEL and File permissions. at php.java.bridge.DynamicJavaBridgeClassLoader.loadClass(DynamicJavaBridgeClassLoader.java:293) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:260) at php.java.bridge.SimpleJavaBridgeClassLoader.forName(SimpleJavaBridgeClassLoader.java:188) at php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:495) at php.java.bridge.Request.handleRequest(Request.java:353) at php.java.bridge.Request.handleRequests(Request.java:388) at php.java.bridge.JavaBridge.run(JavaBridge.java:200) at php.java.bridge.BaseThreadPool$Delegate.run(BaseThreadPool.java:66) Caused by: java.lang.ClassNotFoundException: Class org.apache.lucene.search.IndexSearcher not found at php.java.bridge.DynamicClassLoader.loadClass(DynamicClassLoader.java:418) at php.java.bridge.DynamicJavaBridgeClassLoader.loadClass(DynamicJavaBridgeClassLoader.java:291) ... 8 more Feb 12 15:26:00 JavaBridge DEBUG: 169c14a7@5c2554a7 <-- <E v="1" m="java.lang.Exception: CreateInstance failed: new org.apache.lucene.search.IndexSearcher(o(PhpParserString)). Cause: java.lang.ClassNotFoundException: Could not find org.apache.lucene.search.IndexSearcher in java_require() path. Please check the ... When I rem out the logging lines in php.ini and restart, Lucene works again. I don't understand why apparently my class path is wrong or maybe the ClassLoader is malfunctioning only when logging is enabled. Any suggestions? -- Lee Feistel Lone Star Internet, Inc. (512) 708-8006 |
From: <php...@li...> - 2007-02-13 12:25:36
|
Hi, it's unlikely that there's a memory leak in the java back end (assuming you run the back end as a sub process of Apache or IIS). The legacy binaries for PHP called "java.so" and "php_java.dll" do have some leaks, but they are harmless because the zend engine takes care of them. So we must find the reason why apache stops responding. Can you please open a bug report (please use http://sourceforge.net/tracker/?func=add&group_id=117793&atid=679233) and attach the following information: - Ppease set the log level to 4 and run the test again (log levels >5 enable special test code for the maintainers and should not be used, please see the LogLevel documentation from the README for details) - if possible please provide some code so that we can reproduce this problem. - if you see an OutOfMemoryError in the javabridge log file, please create a memory dump, if possible. Please see the FAQ how to bridge handles Java OutOfMemoryErrors and how to create a memory dump. Regards, Jost Boekemeier ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de |
From: <php...@li...> - 2007-02-19 21:54:01
|
Ok. Just to follow up on this issue. I discovered that there was actually a leak coming from failure to close a lucene searcher object at the right time, which seemed to be causing the main problem. We have seen only one crash since that was fixed. We got logging working by removing this line: java.log_file="/tmp/bridgelog" and only specifying: java.log_level="4" Apparently, specifying the filename is causing a problem with logging, but just letting it log to the apache error log is working. We are continuing to monitor the situation with the log and waiting to see if we have any more problems. Thanks for your reply, Lee Feistel On Tuesday 13 February 2007 06:25, php...@li... wrote: > Hi, > > it's unlikely that there's a memory leak in the java > back end (assuming you run the back end as a sub > process of Apache or IIS). > > The legacy binaries for PHP called "java.so" and > "php_java.dll" do have some leaks, but they are > harmless because the zend engine takes care of them. > > So we must find the reason why apache stops > responding. > > Can you please open a bug report (please use > http://sourceforge.net/tracker/?func=add&group_id=117793&atid=679233) > and attach the following information: > > - Ppease set the log level to 4 and run the test again > (log levels >5 enable special test code for the > maintainers and should not be used, please see the > LogLevel documentation from the README for details) > > - if possible please provide some code so that we can > reproduce this problem. > > - if you see an OutOfMemoryError in the javabridge log > file, please create a memory dump, if possible. Please > see the FAQ how to bridge handles Java > OutOfMemoryErrors and how to create a memory dump. > > > Regards, > Jost Boekemeier > > > > > ___________________________________________________________ > Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users -- Lee Feistel Lone Star Internet, Inc. (512) 708-8006 |