You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jerald Powel <ge...@yahoo.co.uk> on 2004/02/25 05:02:30 UTC

Memory leak across contexts?

Hello,

     I have 4 apps with different contexts running under the one instance of Tomcat. They run fine, but progessively get slower and slower until a server bounce is necessary. After that point, they run fine until they start to be become progressively slower etc. 

     The apps all link to each other, after the session is inavalidated (1 session per app). Does any one have experience of a perfomance hit when swapping between contexts/sessions? Each session is not held within a collection. 

thanks

G.  

   

		
---------------------------------
  Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now

Re: Memory leak across contexts?

Posted by Tim Funk <fu...@joedog.org>.
1) Try using a memory profiler.
2) Or install 4 tomcat instances each with its own webapp and see if all 4 
die or just one becomes bad. If only one dies-  then its webapp code issue. 
If all four die - it is probably still a webapp issue but its consistent 
across all 4 of your webapps

-Tim

Jerald Powel wrote:

> Hello,
> 
>      I have 4 apps with different contexts running under the one instance of Tomcat. They run fine, but progessively get slower and slower until a server bounce is necessary. After that point, they run fine until they start to be become progressively slower etc. 
> 
>      The apps all link to each other, after the session is inavalidated (1 session per app). Does any one have experience of a perfomance hit when swapping between contexts/sessions? Each session is not held within a collection. 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: encodeURL / jsessionid

Posted by Mike Curwen <gb...@gb-im.com>.
No, sessions are not 'server' wide, they are scoped only to a single
user, of a single application.  I was looking up in 'cross context' and
'single-sign-on' in the tomcat docs (config docs for Context and Host,
respectively), but they don't appear to mention sharing a session.  Only
the ability to dispatch between apps, or to be challenged only once for
Auth. 
 
Anyone else have ideas ?  ( I think Session sharing is, strictly
speaking, against spec).
 





> -----Original Message-----
> From: Jerald Powel [mailto:geraldpowel@yahoo.co.uk] 
> Sent: Wednesday, February 25, 2004 4:43 PM
> To: Tomcat Users List
> Subject: RE: encodeURL / jsessionid
> 
> 
> 
> Hi,
> 
>     app1 and app2 are two applications under a single 
> instance of TC, with different contexts (defined in the server.xml). 
> 
> http://localhost:8080/app1
> 
> http://localhost:8080/app2
> 
> I wish to persist data when linking across the two. I was 
> under the impression that by using encodeURL or 
> getRequestedSessionId(), and acquiring the session ID,  I 
> could accomplish this? Please instruct me otherwise. 
> 
> regards  
> 
> G.  
> 
> when you say 'app1' and 'app2', what do you mean?
> Sessions are not shared between two different web-apps.
> 
> 
> > -----Original Message-----
> > From: Jerald Powel [mailto:geraldpowel@yahoo.co.uk]
> > Sent: Wednesday, February 25, 2004 3:46 AM
> > To: Tomcat Users List
> > Subject: Re: encodeURL / jsessionid
> > 
> > 
> > That was my first move, but it was null....
> > 
> > G.
> > 
> > 
> > Antonio_Fiol_Bonnín wrote:
> > 
> > 
> > 
> > 
> > 
> > 
> > Jerald Powel wrote:
> > 
> > >Hi,
> > >
> > > I wish to maintain state across contexts and have in app1:
> > >
> > >
> > >
> > >">app2
> > >
> > >when app2 is loaded the jsessionid is visible in the address bar:
> > >
> > >http://localhost:8086/app2/index.jsp;jsessionid=7DD63005E4142
> E8C75A2E75
> >CBAC0534
> >
> >Now what do I do with it? How do I access data set on the session on
> >the previous context?
> >
> >Thanks a lot
> >
> >G.
> 
> 
> 
> 		
> ---------------------------------
>   Yahoo! Messenger - Communicate instantly..."Ping" your 
> friends today! Download Messenger Now
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: encodeURL / jsessionid

Posted by Jerald Powel <ge...@yahoo.co.uk>.
Hi,

    app1 and app2 are two applications under a single instance of TC, with different contexts (defined in the server.xml). 

http://localhost:8080/app1

http://localhost:8080/app2

I wish to persist data when linking across the two. I was under the impression that by using encodeURL or getRequestedSessionId(), and acquiring the session ID,  I could accomplish this? Please instruct me otherwise. 

regards  

G.  

when you say 'app1' and 'app2', what do you mean?
Sessions are not shared between two different web-apps.


> -----Original Message-----
> From: Jerald Powel [mailto:geraldpowel@yahoo.co.uk] 
> Sent: Wednesday, February 25, 2004 3:46 AM
> To: Tomcat Users List
> Subject: Re: encodeURL / jsessionid
> 
> 
> That was my first move, but it was null....
> 
> G.
> 
> 
> Antonio_Fiol_Bonnín wrote:
> 
> 
> 
> 
> 
> 
> Jerald Powel wrote:
> 
> >Hi,
> >
> > I wish to maintain state across contexts and have in app1:
> >
> >
> >
> >">app2
> >
> >when app2 is loaded the jsessionid is visible in the address bar:
> >
> >http://localhost:8086/app2/index.jsp;jsessionid=7DD63005E4142
E8C75A2E75
>CBAC0534
>
>Now what do I do with it? How do I access data set on the session on 
>the previous context?
>
>Thanks a lot
>
>G.



		
---------------------------------
  Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now

RE: encodeURL / jsessionid

Posted by Mike Curwen <gb...@gb-im.com>.
when you say 'app1' and 'app2', what do you mean?
Sessions are not shared between two different web-apps.


> -----Original Message-----
> From: Jerald Powel [mailto:geraldpowel@yahoo.co.uk] 
> Sent: Wednesday, February 25, 2004 3:46 AM
> To: Tomcat Users List
> Subject: Re: encodeURL / jsessionid
> 
> 
> That was my first move, but it was null....
>  
> G.
> 
> 
> Antonio_Fiol_Bonnín <fi...@terra.es> wrote:
> 
> <%= request.getSession().getAttribute("id"); %>
> 
> 
> 
> 
> Jerald Powel wrote:
> 
> >Hi,
> >
> > I wish to maintain state across contexts and have in app1:
> >
> >
> >
> >">app2
> >
> >when app2 is loaded the jsessionid is visible in the address bar:
> >
> >http://localhost:8086/app2/index.jsp;jsessionid=7DD63005E4142
E8C75A2E75
>CBAC0534
>
>Now what do I do with it? How do I access data set on the session on 
>the previous context?
>
>Thanks a lot
>
>G.
> 
>



> ATTACHMENT part 2 application/x-pkcs7-signature name=smime.p7s


		
---------------------------------
  Yahoo! Messenger - Communicate instantly..."Ping" your friends today!
Download Messenger Now


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: encodeURL / jsessionid

Posted by Jerald Powel <ge...@yahoo.co.uk>.
That was my first move, but it was null....
 
G.


Antonio_Fiol_Bonnín <fi...@terra.es> wrote:

<%= request.getSession().getAttribute("id"); %>




Jerald Powel wrote:

>Hi, 
>
> I wish to maintain state across contexts and have in app1:
>
>
>
>">app2
>
>when app2 is loaded the jsessionid is visible in the address bar:
>
>http://localhost:8086/app2/index.jsp;jsessionid=7DD63005E4142E8C75A2E75CBAC0534
>
>Now what do I do with it? How do I access data set on the session on the previous context?
>
>Thanks a lot
>
>G.
> 
>



> ATTACHMENT part 2 application/x-pkcs7-signature name=smime.p7s


		
---------------------------------
  Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now

Re: encodeURL / jsessionid

Posted by Antonio Fiol Bonnín <fi...@terra.es>.
<%= request.getSession().getAttribute("id"); %>


Jerald Powel wrote:

>Hi, 
>
>     I wish to maintain state across contexts and have in app1:
>
><% request.getSession().setAttribute("id","2004073258"); %>
>
><a href="<%= response.encodeURL("../app2/index.jsp") %>">app2</a>
>
>when app2 is loaded the jsessionid is visible in the address bar:
>
>http://localhost:8086/app2/index.jsp;jsessionid=7DD63005E4142E8C75A2E75CBAC0534
>
>Now what do I do with it? How do I access data set on the session on the previous context?
>
>Thanks a lot
>
>G.
>  
>


encodeURL / jsessionid

Posted by Jerald Powel <ge...@yahoo.co.uk>.
Hi, 

     I wish to maintain state across contexts and have in app1:

<% request.getSession().setAttribute("id","2004073258"); %>

<a href="<%= response.encodeURL("../app2/index.jsp") %>">app2</a>

when app2 is loaded the jsessionid is visible in the address bar:

http://localhost:8086/app2/index.jsp;jsessionid=7DD63005E4142E8C75A2E75CBAC0534

Now what do I do with it? How do I access data set on the session on the previous context?

Thanks a lot

G.

 

 

		
---------------------------------
  Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now