This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Memory size keeps increasing!!  RSS feed

 
Vivek Mehra
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ranchers,
I am having a problem in my EJB application.When i run the app the memory size keeps increasing and after a point i see 2 exceptins and application stops responding.I am using mdb's to accept requests and remote session and local entity beans.I am using JBOSS-4.0.2.

1)In the MDB i get "Connection Failed use javax.jms.Connection.setExceptionListner to handle this exception and reconnect".

2)"OutOfMemoryError"

I have tried closing the context object but the problem persists. Is this a config problem or maybe a programming issue. I am clueless why this memory leak is occuring.

Any help is appreciated ranchers.
 
Scott Selikoff
author
Bartender
Posts: 4093
21
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to monitor garbage collection and run through the application with a fine toothed comb. Try setting pointers to objects that you no longer use to null and avoid static variables as possible.

Also, you can request a garbage collection (often after a large memory-intensive process) but there's no guarentee it will work and java won't let go of memory that it thinks it needs.

My tendency would be to think this is a programming problem, although configuration is always possible. The easy check is try the same MDB config with dummy code that does nothing. It should give you an idea either way.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!