Re: [PHP-DEV] Servlet SAPI questions From: Alex Akilov (akilov <email protected>)
Date: 11/20/00

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

-- 
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>