Possible causes for a Session Leak

Asked

Viewed 121 times

4

Through a monitoring tool, I am noting that my application has a considerable user session Leak. Every day, about a thousand user sessions are created, without any being destroyed. To take sessions out of memory, you need to restart the application server.

Besides the timeout of the Session may not be set, what else could cause a Session Leak?

  • 3

    Are you saving an instance of Session in a static attribute? This would cause the Session object of each session to not be collected.

  • 3

    Have you ever tried to put one HttpSessionListener with logs to see if the method sessionDestroyed is called?

  • I will check these possibilities and return. However, the ideal answer would be to have the main causes of a Session Leak. This is because, being a very old application, the possibility of being more of a problem is very large.

  • Do you know what kind of application is published in your jboss? JSF 1.2, JSP, JSF 2.0? Sometimes EJB’s with poorly defined life cycle can cause this kind of problem.

  • @Edgarmunizberlinck, this application in specific is published with JSF 2.0.

1 answer

1

What can cause this kind of problem in JSF applications is the following:

  • Managedbeans with a life cycle defined as Applicationscope or Sessionscoped which are not properly treated.
  • Phaselistener badly written that record many things in the session and do not withdraw.

Usually this kind of problem is programming and not of technology. I suggest you review the application code.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.