Re: Servlet SAPI questions

From: Date: Mon, 20 Nov 2000 19:32:01 +0000
Subject: Re: Servlet SAPI questions
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-38665@lists.php.net to get a copy of this message
Chris, My theory is that this may have something to do with local reference management (or lack thereof) in the PHP/Java code. Try setting TOMCAT_OPTS=-verbose:jni before starting tomcat and see if you get a bunch of capacity ALERTs prior to your failures. I think that eventually Java is generating an OutOfMemory exception which PHP/Java isn't handling. This may also explain the problems with using arrays that was reported in bug 6616 since creating arrays will easily eat up your limited local references (usually limited to 16 which requires you to delete them constantly). Again, this is just a theory. I'm not a JNI expert but I did observe these ALERTs and reported my findings to both Sun and IBM. Note that some JDK's are better at handling this situation than others although most of the ones I've seen do a poor job of managing their own local refs in JNI code since they report these ALERTs just by running their own code (e.g. System.initProperties()). IBM's JDKs makes things worse since their local ref capacity appears to be 2 instead of 16 which causes almost all JNI calls exceed the capacity. BTW, I think these types of discussions probably don't belong on the developers mailing list unless they have a bug associated with them. As there are a few bugs open on Servlet crashes (e.g. 7624) I felt it wouldn't hurt to chime in on this particular one. Alex

« previous php.dev (#38665) next »