• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Memory size keeps increasing!!

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Hug your destiny! And hug this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic