Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

OutofMemory Error.. Due to Pooling?  RSS feed

 
Ranch Hand
Posts: 445
Android Eclipse IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,

We are using JNDI with Struts for DS and Connection Pooling. The issue is we very often getting this 'OutOfMemoryError'. And after a server restart only we can able to use the application. Currently we dont have much data's say around 5000, but after implementation, it'll go upto 1lakh. My question is , is there any way to find if there is an memory leak in the application? Because, for another application we are using Spring + DBCP and it never give us any problem yet.

Or else,do we need to close each and every connection manually in Controller itself? Which one do you suggest and please help me get rid of this.

Thanks in advance.
 
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you should always release JDBC resources in a finally block after you have finished with them.

To find memory leaks, run your application in a soak test environment and watch memory consumption. If it keeps rising, you may have a leak. To find it, profile what the application is doing with a profiler.
 
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

To find it, profile what the application is doing with a profiler.



Try visualvm
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!