• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

OutOfMemoryErrors

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am maintaining a UPS application which was developed in java.The developer had used 4 packages which include around 60-70 classes.It has an inbuilt webserver,also uses SNMP,serial,Modem communication for the UPS monitoring.There are many threads running in the application simultaneously,there are many global,static structures,swing components used to show a tree structure of the upses connected.every ups has an static object associated with it which occupies 8000 bytes.Like wise when the number of upses configured reaches 110 or more the application gives outof memory errors.Also restructuring the application is a costly affair,time consuming and we cannot spend so much time as it is already in the market.we have approached the problem in the following ways
1) Trying to identify the variables which have not been initialized back to null after use.
2) See what logics can be changed,optimized.
3) To include only those classes which are used , instead the whole package.
4) Trying to see the possibility where we can change the static methods to non static methods.
5) Changing the data type of all intergers who are constant to byte so that they occupy lesser memory.
still the problem remains the same.is there any other strategy available to effectively tackle this problem.can i get some help on this.
 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello natraj,
we had a similar problem with our application. we used a program called jProbe, to find the memoryleak. it took a few days, to get the information needed, but it was worth it. in our case it was an object, that wasn't destroyed by the destructor after use. the object was built 'on the fly', so we had no chance to set it 'null'.
regards,
lars
 
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


we had a similar problem with our application. we used a program called jProbe, to find the memoryleak.


Another good profiler is OptimizeIt. You can guess all day long where your performance bottlenecks and memory leaks are, but they are likely not where you think they are. Run the profiler and see for yourself.
Eugene.
 
I wish to win the lottery. I wish for a lovely piece of pie. And I wish for a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic