Application Server Solutions for Microsoft IIS and ASP.NET
       solutions   products   partners   company   support   downloads         store
View Interest List Message Details
<< Back to Search Results

Date: 09/08/2005
From: matt@newatlanta.com
Subject: Re: [ServletExec] JNI int[] references not being cleaned up by GC
For those interested in the outcome of this issue:

Working with Catherine (off-list) it was determined that this problem 
was occuring on her system when OptimizeIt was "hooked into" the JVM 

inside which SE is running.
In Catherine's case, OptimizeIt was "hooked in" by means of the 

following 2 "-X" options passed to the JVM:

-X
bootclasspath/a:C:\Optimizeit\OptimizeitEntSuite60\lib\optit.jar;C:\Optimizeit\O
ptimizeitEntSuite60\lib\oibcp.jar
-Xrunpri:startAudit=t

She found that if she removed those options and restarted the JVM, then 
the problem essentially went away.

There may in fact be other memory-related issues that she is seeing, but 
at this time there is insufficient evidence to say whether the cause is 
SE, the code running inside SE, or just a case of the application 
genuinely needing more memory to do what it has been asked to do.

Matt McGinty
Software Engineer
New Atlanta Communications, LLC
http://www.newatlanta.com 



Lazatin, Catherine J (GE Healthcare) wrote:

>The directory structure for the test JSP is:
>
>C:\Program Files\New Atlanta\ServletExec
>ISAPI\webapps\default\simpletest
>
>
>Our actual web application resides under:
>
>C:\Program Files\New Atlanta\ServletExec ISAPI\webapps\default\<app dir
>name>
>
>
>- Catherine
>
>-----Original Message-----
>From: servletexec-interest-owner@mail.newatlanta.com
>[mailto:servletexec-interest-owner@mail.newatlanta.com] On Behalf Of
>matt@newatlanta.com
>Sent: Monday, August 29, 2005 2:11 PM
>To: servletexec-interest@mail.newatlanta.com
>Subject: Re: [ServletExec] JNI int[] references not being cleaned up by
>GC
>
>When you say "the dir is otherwise empty" do you mean a directory 
on
>your hard-drive?
>Does that directory reside inside your more full-blown webapp (a
>subdirectory within that webapp perhaps) ?
>Or is it a directory that belongs to it's own, emtpy webapp, so that
>requests for that JSP are actually going to a bare-bones webapp that
>only contains 1 requestable item (the JSP), and does not contain any
>sort of Listeners, or Filters, etc...
>
>Matt McGinty
>Software Engineer
>New Atlanta Communications, LLC
>http://www.newatlanta.com 
>
>
>
>Lazatin, Catherine J (GE Healthcare) wrote:
>
>  
>
>>Matt,
>>
>>	I used the snippet in its own JSP you sent and removed the other
>>    
>>
>JSP 
>  
>
>>so that the dir is otherwise empty and the memory still grows and is 
>>not being cleaned up after 30 minutes.
>>
>>	- Catherine
>>
>>-----Original Message-----
>>From: servletexec-interest-owner@mail.newatlanta.com
>>[mailto:servletexec-interest-owner@mail.newatlanta.com] On Behalf Of 
>>matt@newatlanta.com
>>Sent: Monday, August 29, 2005 1:19 PM
>>To: servletexec-interest@mail.newatlanta.com
>>Subject: Re: [ServletExec] JNI int[] references not being cleaned up by

>>    
>>
>
>  
>
>>GC
>>
>>Catherine,
>>I'm suggesting that you try using a JSP that looks like this:
>>
>><%@ page session = "false" %>
>><html>
>><p>Hello</p>
>></html>
>>
>>And have that JSP reside inside an otherwise empty webapp.
>>This would just be for the purpose of learning whether or not the 
>>problem still occurs for you.
>>
>>If not, then the issue may very well have to do with sessions.
>>If the problem occurs with that trivial of a test case, then I can try 

>>to reproduce the issue here using that trivial test case.
>>
>>Matt McGinty
>>Software Engineer
>>New Atlanta Communications, LLC
>>http://www.newatlanta.com
>>
>>
>>
>>Lazatin, Catherine J (GE Healthcare) wrote:
>>
>> 
>>
>>    
>>
>>>We have set the session page attribute to true because we want the 

>>>pages to share the current session.  The session needs to be 
>>>maintained
>>>   
>>>
>>>      
>>>
>> 
>>
>>    
>>
>>>across all requests because the application should only have one 
>>>session per user - the session object stores user data that is used 

>>>throughout the application.
>>>
>>>- Catherine
>>>
>>>-----Original Message-----
>>>From: servletexec-interest-owner@mail.newatlanta.com
>>>[mailto:servletexec-interest-owner@mail.newatlanta.com] On Behalf   
Of 
>>>matt@newatlanta.com
>>>Sent: Monday, August 29, 2005 11:34 AM
>>>To: servletexec-interest@mail.newatlanta.com
>>>Subject: Re: [ServletExec] JNI int[] references not being cleaned   
up 
>>>by
>>>   
>>>
>>>      
>>>
>> 
>>
>>    
>>
>>>GC
>>>
>>>Catherine,
>>>What if you add the following line to the top of your JSP:
>>>
>>><%@ page session = "false" %>
>>>
>>>Do you still the problem occur?
>>>
>>>If so, then what if you unhook your Profiler and rerun the test?
>>>Do you see OutOfMemoryError occuring then?
>>>
>>>How many requests per minute or per second does your script make?
>>>Does it maintain the session across multiple requests, or does it 
>>>cause
>>>   
>>>
>>>      
>>>
>> 
>>
>>    
>>
>>>SE to create a brand new session on every single request?
>>>
>>>Matt McGinty
>>>Software Engineer
>>>New Atlanta Communications, LLC
>>>http://www.newatlanta.com
>>>
>>>
>>>
>>>Lazatin, Catherine J (GE Healthcare) wrote:
>>>
>>>
>>>
>>>   
>>>
>>>      
>>>
>>>>	Our application doesn't use Xalan/Xerces or XSL           
transformations.
>>>>I created a simple JSP (included below) and for every 10        
accesses, 
>>>>the
>>>>     
>>>>
>>>>        
>>>>
>> 
>>
>>    
>>
>>>>memory grows 1MB and doesn't get cleaned up even after 20  
minutes.  
>>>>We
>>>>     
>>>>
>>>>        
>>>>
>> 
>>
>>    
>>
>>>>have also run a similar test for a longer period of time        
(hours) in 
>>>>which we ran a script that would access a HelloWorld type JSP.  
The 
>>>>server eventually crashed with out of memory errors.  The       
memory 
>>>>profiler we are using indicates that there are int[] array      
objects 
>>>>that
>>>>  
>>>>
>>>>     
>>>>
>>>>        
>>>>
>>>   
>>>
>>>      
>>>
>>>>are not being garbage collected because of JNI global           
references.
>>>>
>>>>	- Catherine
>>>>
>>>>-------------------------
>>>><%
>>>>int count = 0;
>>>>Integer cnt=(Integer)session.getAttribute("count");
>>>>
>>>>if ( cnt == null) {
>>>>session.setAttribute("count",new Integer(0)); } else  
{  count = 
>>>>cnt.intValue(); } %>
>>>>
>>>><HTML>
>>>><BODY>
>>>>
>>>><% count++; %>
>>>>
>>>><H2> Count = <%=count%> </H2>
>>>>
>>>><%
>>>>session.setAttribute("count", new Integer(count));    
%>
>>>>
>>>></BODY>
>>>></HTML>
>>>>---------------------------------
>>>>
>>>>-----Original Message-----
>>>>
>>>>From: support@servletexec.com [mailto:support@servletexec.com 
>>>><mailto:support@servletexec.com> ]
>>>>
>>>>Sent: Friday, August 26, 2005 3:05 PM
>>>>
>>>>To: Lazatin, Catherine J (GE Healthcare)
>>>>
>>>>Subject: Re: [Fwd: RE: [Fwd: ServletExec and JNI global         
references]]
>>>>
>>>>
>>>>
>>>>If you request a simple hello servlet or simple hello jsp       
(which 
>>>>reside
>>>>  
>>>>
>>>>     
>>>>
>>>>        
>>>>
>>>   
>>>
>>>      
>>>
>>>>in their own separate, bare-bones webapp), do the int[] objects 
keep 
>>>>growing and never go away?
>>>>
>>>>Or does that only occur when you send requests to your webapp?
>>>>
>>>>Matt McGinty
>>>>
>>>>Software Engineer
>>>>
>>>>New Atlanta Communications, LLC
>>>>
>>>>http://www.newatlanta.com <http://www.newatlanta.com/>
>>>>
>>>>
>>>>________________________________
>>>>
>>>>From: servletexec-interest-owner@mail.newatlanta.com
>>>>[mailto:servletexec-interest-owner@mail.newatlanta.com] On      
Behalf Of 
>>>>Rick Bullotta
>>>>Sent: Friday, August 26, 2005 7:32 AM
>>>>To: servletexec-interest@mail.newatlanta.com
>>>>Subject: RE: [ServletExec] JNI int[] references not being       
cleaned up 
>>>>by GC
>>>>
>>>>
>>>>
>>>>Are any of your applications using Xalan/Xerces?  We have seen  
this 
>>>>in
>>>>     
>>>>
>>>>        
>>>>
>> 
>>
>>    
>>
>>>>the past, particularly if you use the XPath or CachedXPath 
>>>>capabilities of Xalan or when doing XSL transformations.
>>>>
>>>>
>>>>
>>>>________________________________
>>>>
>>>>From: servletexec-interest-owner@mail.newatlanta.com
>>>>[mailto:servletexec-interest-owner@mail.newatlanta.com] On      
Behalf Of 
>>>>Lazatin, Catherine J (GE Healthcare)
>>>>Sent: Friday, August 26, 2005 7:38 AM
>>>>To: servletexec-interest@mail.newatlanta.com
>>>>Subject: [ServletExec] JNI int[] references not being cleaned   
up by 
>>>>GC
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Hello.  We have been profiling memory usage and have been      
noticing 
>>>>that JNI references are not being cleaned up in ServletExec     
even 
>>>>after
>>>>45 min.  We are seeing a large growth 2-3MB of int[] arrays     
with each
>>>>        
>>>>
>
>  
>
>>>>request that goes through ServletExec.  (We are using IIS 5.1   
and 
>>>>ServletExec ISAPI 5.0.)  Has anyone else seen this issue?
>>>>
>>>>
>>>>
>>>> - Catherine
>>>>
>>>>
>>>>----------------------------------------------------------------
-----
>>>>-
>>>>-
>>>>  
>>>>
>>>>     
>>>>
>>>>        
>>>>
>>>--
>>>
>>>
>>>   
>>>
>>>      
>>>
>>>>ServletExec-Interest. For archives and unsubscribe              
instructions,
>>>>     
>>>>
>>>>        
>>>>
>>visit:
>> 
>>
>>    
>>
>>>> http://www.newatlanta.com/servletexec-interest.jsp
>>>>
>>>>
>>>>  
>>>>
>>>>     
>>>>
>>>>        
>>>>
>>>--------------------------------------------------------------------
--
>>>-
>>>-
>>>-
>>>ServletExec-Interest. For archives and unsubscribe instructions,
>>>      
>>>
>visit:
>  
>
>>>  http://www.newatlanta.com/servletexec-interest.jsp
>>>
>>>--------------------------------------------------------------------
--
>>>-
>>>-- ServletExec-Interest. For archives and unsubscribe instructions,

>>>visit:
>>>
>>>  http://www.newatlanta.com/servletexec-interest.jsp
>>>
>>>
>>>   
>>>
>>>      
>>>
>>-----------------------------------------------------------------------

>>-
>>-
>>ServletExec-Interest. For archives and unsubscribe instructions, visit:

>>
>>   http://www.newatlanta.com/servletexec-interest.jsp
>>
>>-----------------------------------------------------------------------

>>-- ServletExec-Interest. For archives and unsubscribe instructions, 
>>visit:
>>
>>   http://www.newatlanta.com/servletexec-interest.jsp
>> 
>>
>>    
>>
>
>------------------------------------------------------------------------
>-
>ServletExec-Interest. For archives and unsubscribe instructions, visit:
>
>    http://www.newatlanta.com/servletexec-interest.jsp
>
>-------------------------------------------------------------------------
>ServletExec-Interest. For archives and unsubscribe instructions, visit:
>
>    http://www.newatlanta.com/servletexec-interest.jsp
>  
>

-------------------------------------------------------------------------
ServletExec-Interest. For archives and unsubscribe instructions, visit:

    http://www.newatlanta.com/servletexec-interest.jsp

Message Thread
Date Subject Author
08/26/2005 RE: [ServletExec] JNI int[] references not being cleaned up by GC Rick.Bullotta@lighthammer.com
08/26/2005 RE: [ServletExec] JNI int[] references not being cleaned up by GC Catherine.Lazatin@ge.com
08/29/2005 Re: [ServletExec] JNI int[] references not being cleaned up by GC matt@newatlanta.com
08/29/2005 RE: [ServletExec] JNI int[] references not being cleaned up by GC Catherine.Lazatin@ge.com
08/29/2005 Re: [ServletExec] JNI int[] references not being cleaned up by GC matt@newatlanta.com
08/29/2005 RE: [ServletExec] JNI int[] references not being cleaned up by GC Catherine.Lazatin@ge.com
08/29/2005 Re: [ServletExec] JNI int[] references not being cleaned up by GC matt@newatlanta.com
08/29/2005 RE: [ServletExec] JNI int[] references not being cleaned up by GC Catherine.Lazatin@ge.com
09/08/2005 Re: [ServletExec] JNI int[] references not being cleaned up by GC matt@newatlanta.com
08/26/2005 [ServletExec] JNI int[] references not being cleaned up by GC Catherine.Lazatin@ge.com
<< Back to Search Results


   
company media information terms of use privacy policy contact us