Things to keep in mind while programming to avoid heap and permgen errors?

I some time get Java heap error and permgen error in my project which is having large code base i.e 2500 java lasses.
I know about two jvm parameter which we can set to deal with for java heap we can -Xms 1024 -Xmx 1024 and for permgen we can set -Xmx:permgen 256m.
That also sometime does not solve the problem. I am looking forward if we can do something proactively while programming the application so that we can descrease the probablity of facing such issues. here is my understanding
Permgen error can occur either at serverstart up or at application run time. I can think two main reason for this:
1) More the classes will be loaded more spaces will be eaten in permgen area.
2) Too many reference of static variable in application (as they gets also stored in permgen area). Agreed it wont make much difference. Probably millions of variable can make difference.
3)Too many string literals used in application.
So while programming we can take care of points 2 and 3 if we can avoid them. Looking for some other solutions also which we can keep in mind while programming to avoid these situations(For both permgen and java heap out of memory issue). Could not come up if we can follow any proactive approach for not facing java heap out of memory issue?

JavaFunda wrote:
As per understanding app server should unload the classes as soon as we stop the server.Well, if you stop the server then it'll definitely unload the classes. Or unloading might not be an accurate term.
Basically what we do is undeploy and deploy.That's not stopping the server. Unfortunately most of the app servers do require restarts, since they can't get rid of all the crud.
Is your program doing significant dynamic class loading?Not sure how can i get information about thisRead up a bit on dynamic class loading and see if it looks like something your program is doing a lot (probably not).

Similar Messages

  • Things to keep in mind while finalizing To Be Process

    Hi Gurus,
    Please tell me, what things i should keep in mind while finalizing to be process?
    And what to do when client ask for something which i dont know that SAP is providing or not?
    Waiting for reply.
    Thank You
    Regards,

    hello please read below
    points will be appreciated
    Implementing a package can be a traumatic affair for both the customer and the vendor.   Get it wrong and the vendor may get paid late or have to resort to lawyers to get paid and tarnish their reputation.   For the company the new package may not work the way they expected, be late or cost a more than budgeted for and take management will take their eye off running their business.
    Recently a client asked me what I would consider to be the five most important things one should consider before embarking on an implementation.   This isn't a simple question, although there are many factors to think about after some consideration for me the top five are way ahead of the others.
    My top five factors to consider would be:
    1. Set up a Project Board,
    2. Secure the resources,
    3. Complete the GAP Analysis,
    4. Have detailed Cut Over Plans,
    5. Train the users.
    Taking each one in turn:
    The Project Board
    The correct set up and operation of the Project Board in my view is major factor in the success failure of the project.   The Project Board will consist of the stakeholders, key users and the vendor.   The Project Board is part of the governance of the project.   The Project Board will meet regularly to ensure that the project plans are created and being executed as planned, moves from stage to stage with all the deliverables being signed off is resourced properly.
    The Resources
    Three types of resources are absolutely necessary -- end users, change team and technicians.
    Early involvement by the end users is absolutely necessary, as they will be the ones living with the system for hopefully many years to come.   They will want to feel involved in its implementation.   Buy in from the end users of the system is absolutely essential if the system is to have a long and stable life in any organisation.
    The Change Team will identify the gaps between the package and the business requirements, re-engineer some of the businesses process to cope with the package, train the users to ensure implementation is smooth as possible into the business.
    The Technical Team will prepare the systems environment for the package, apply any software fixes from the vendor, implement the software in the best way possible for the organisation set up and tune the software for the particular technical environment.
    GAP Analysis
    A through gap analysis will identify the gaps between how the business operates ad its needs against what the package can can't do.   For each gap there will be one of three outcomes which must be recorded and actioned, GAP must be closed and customised software can be developed close the gap, GAP must be closed but software cannot be written therefore a workaround is required, GAP does not need to be closed.
    In simple terms: Gap means small cracks. In SAP world.  In information technology, gap analysis is the study of the differences between two different information systems or applications( ex; existing system or legacy system with Client and new is SAP), often for the purpose of determining how to get from one state to a new state. A gap is sometimes spoken of as "the space between where we are and where we want to be." Gap analysis is undertaken as a means of bridging that space.
    Actual gap analysis is time consuming and it plays vital role in blue print stage.
    Cut Over Plans
    Detailed plans need to be developed for cutting over from the old system(s) to the new.   Parallel runs of what will happen over the conversion period using test data, convert and watch for a period after wards to ensure nothing unexpected happens.
    Train Users
    Well trained users will support and defend the system on site.  Unsupportive users will continually undermine the system and eventually it will be replaced.   Therefore the more effort you put into helping the users master the system early the better.
    Difference between the User Exit & Gap analysis.
    Both are quiet a different and has a small relation.
    User exits are standard gate ways provided by SAP to exit the standard code and we can write our own code with the help of ABAP workbench.   its not new functionality which we are trying to build in sap but its slight enhancement within the same code. 
    Gap analysis is start point of Realization and once blue print is finished we have to find the realization of sap system for client requirment and there will be certain gaps when compared to system fit.  Those gaps can be closed either by re-engineering of business process to fit with SAP or we have to use USER exits in case of small deviations or complete enhancements with the help of ABAP to fit with the SAP system.   *-- V. Sridhar

  • What to keep in mind whilie developing under the new IOS PLA

    Hi everyone.
    I found out the the new IOS PLA was introduced on June 2nd. I could not spot any noticeable differences from the previous one.
    The fellow developers at my office are quite acquaint with the previous PLA, however the release announcement sort of created confusion among them. They all wonder what to keep in mind while developing and publishing the apps under the new PLA.
    Your help will be much appreciated!
    Thanks in advance

    Very simply "wired for internet" just means that you have, probably, Category 5 (CAT5) ethernet cables and jacks prewired in the home. These cables should all lead to one common location, hopefully in a patch panel or box. In order for this arrangement to be of any use you need a multi-port router and/or switch. I doubt whether the contractor provides this router/switch as part of the deal. Anyway the router/switch would connect all of these cables together as well as your internet service (DSL, Cable Modem, whatever). Plugging into any of the jacks in the home would connect you to the router/switch, which in turn would issue your device an IP address and connect you to the network. Internet access, as well as file sharing, would be controlled by the router/switch. Very basic home network and nothing complicated. Your Apple TV will work just fine with this network. You could also connect a network storage device, such as a large capacity hard drive that could be shared by all users on the network. Getting more complicated involves having a dedicated server machine running OS X Server for example.

  • HT4623 The "Software Update" feature is not available in my Ipod 2nd Generation unit while the upgrade option in iTunes keeps on hanging while downloading the upgrade iOS (time out error). So, please tell me how I can upgrade the iOS.

    The "Software Update" feature is not available in my Ipod 2nd Generation unit while the upgrade option in iTunes keeps on hanging while downloading the upgrade iOS (time out error). So, please tell me how I can upgrade the iOS.

    The Settings>General>Software Update comes with iOS 5. The 2G can only go to iOS 4.2.1
    Try disabling the computer's security software during the download and update.

  • Things to have in mind while transporting to PRD

    Hi folks !
    I need to ask you for a few tips to see what to do you think,
    Now I'm working in a project where there are only a PI (7.0) DEV and a PRD systems. There aren't a QAS server.
    So, in the next few days i'll have to make the transports and I'd like to know the activities to do in the recently installed PRD server.
    I have interfaces like:  SOAP <--->  RFC, in this case, do I have to redefine the Webservice in the ID PRD system?
    In spite of the the other interfaces that use IDOC (inbound & outbound) do I have to make all the partner agreements, ports, RFC dest. & all the activities made in DEV ?
    If something is missing or you want to add st., it'd be welcome.
    Thanks in advance ,
    Juan

    Hi Juan,
    > do I have to redefine the Webservice in the ID PRD system?
    You can able to change the wsdl in Dev with the production parameters.  But I would recommend to create the new wsdl.
    > do I have to make all the partner agreements, ports, RFC dest. & all the activities made in DEV ?
    Yes you need to create all these settings in production also. Also you need to transport abap objects if you have any in xi like alerts etc. If you use any business system name in mapping make sure it changes accordingly in prodution also. You need to configure only communication cahnnels in production once again which points to the productions parameters.a
    Regards,
    ---Satish

  • While running windows updates KB2971850 and KB3000850, error 80070002 appears.

    Original post
    here. Was told to post in this forum.
    Both KB2971850 and KB3000850 fail.
    Running Windows 8.1 Enterprise 64 bit.
    Steps tried:
     - Log on as Administrator
     - Stop Windows Update Service and clear SoftwareDistribution\Download and DataStore.
     - Perform clean boot by disabling all startup and all non-MS services
     - Download and run WindowsUpdateDiagnostic.diagcab
     - Download standalone installers for each KB update
    Absolutely nothing works. Looks like other people have had the same error however one of the above steps always seemed to fix it.
    Can anyone help?

    Hi Gardnerp2,
    You can follow these steps to troubleshoot this kind of issue:
    You can't install updates in Windows Vista, Windows 7, Windows Server 2008, or Windows Server 2008 R2
    https://support.microsoft.com/en-us/kb/2509997
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Error while trying to sync audio and video.

    Suddenly out of the blue I'm have all sorts of problems with Logic 8. I keep getting the "error while trying to synchronize audio and midi" error message. Even when I'm just using using the audio side. Do you know of a local logic tech that could check out my system? Might be a problem with my motu 828mk11 audio interface or corrupt drivers, bad preferences. I'm unable to do any work in Logic until I get this problem solved.

    (Did you do any upgrades with the Firewire plugged in?)
    Usually a MOTU reset will fix this.
    Follow these steps to restore the 828mkII to Factory Default Settings.
    •Disconnect the firewire cable from the 828mkII
    •Press the Setup knob
    •Turn the Setup knob all the way to the right
    •Press the Select knob
    •Press the Value knob
    •Power off the interface and plug the firewire cable back in
    •Power the interface back on
    http://www.motu.com/techsupport/technotes/document.2004-06-16.6405589976/view
    If that doesn't work.
    1) Unplug ALL cables from the 828MkII.
    2) Double check that the power cord is really unplugged.
    3. Switch the voltage switch on the side from your setting (110 in the US) to the other setting and back a few times.
    4) Make sure you've set the voltage switch back to the right setting for your country.
    5) Plug everything back in.
    pancenter-

  • I keep getting 'Please connect to the internet and retry' error message.

    I've signed out of creative cloud on my Macbook Pro in order to use my log in details on another Mac (rented for an onsite edit abroad), I now want to return to using creative cloud on my Macbook but I'm having issues signing back in. I keep getting the 'Please connect to the internet and retry' error message even though my network is working fine, I have tried connecting on my home wifi and the network at my office. Does anyone know how I can sign in and use my Adobe apps?

    Please read https://forums.adobe.com/thread/1499014
    -try some steps such as changing browsers and turning off your firewall
    -also flush your browser cache so you are starting with a fresh browser
    http://myleniumerrors.com/installation-and-licensing-problems/creative-cloud-error-codes-w ip/
    http://helpx.adobe.com/creative-cloud/kb/failed-install-creative-cloud-desktop.html
    or
    A chat session where an agent may remotely look inside your computer may help
    Creative Cloud chat support (all Creative Cloud customer service issues)
    http://helpx.adobe.com/x-productkb/global/service-ccm.html

  • My iTunes program keeps coming on while  am working on other documents.  How do i prevent this from occurring?

    iTunes progam keeps coming on while  am working on other documents.
    How do  prevent this from occuring continuously?

    When you open iTunes and plug in iPhone (iPod) to computer, it appear in the left bar. Then just simply right click on you iPhone (iPod) and choose Transfer Purchases, this should copy your purchased items to your computer.
    Hope this help

  • There is  Red Icon at the top bar and it says I have a virus and things keep popping up saying I have a virus and need to do a scan and pay for some sort of software to complete the scan, someone told me that this is a virus in. How do I get rid of it?

    There is  Red Icon at the top bar and it says I have a virus and things keep popping up saying I have a virus and need to do a scan and pay for some sort of software to complete the scan, someone told me that this is a virus in. How do I get rid of it?

    This could well be the notorious Mac Defender - which is an annoying program that tricks you into thinking that your Mac is infected with a virus, when the only infection is Mac Defender itself.
    When surfing the web never EVER click on a link that says "Free anti-virus scan" or "Scan now" - they are nearly always scams which will end up infecting your computer.  Although Macs are resistant to viruses, they're not resistant to user stupidity.
    If you Google "Mac defender" then you'll find plenty of sites with instructions on how to remove this minor nuisance.  Take this as a warning that you need to be more careful in your surfing habits.
    Bob

  • After worling for a while program now crashes on launch

    I have been tooling around the Encore interface for a couple of weeks. Now when I launch the app, it crashes on launch, I am on a mac pro running
    10.4.10 with 5GB ram, All the other CS3 titles work fine. Now that I'm learning to use Encore, I wish it would work, too. I've tried rebooting a million times as well as updating the software. I don't believe I've added any new software or hardware. Help!

    It could be because the run-time didn't get installed properly. You can try comparing windows\system32\cvirte.dll and the contents of the windows\system32\cvirte folder between your development computer and your target computer to make sure that they are the same (keep in mind that the paths are different in your development computer: windows\syswow64\cvirte.dll and windows\syswow64\cvirte).
    Also, make sure that you are able to run a release-build version of your program in your development computer to confirm that this is a distribution problem and not just a release vs. debug problem.
    Make sure that you are building and deploying a 32-bit version of your program, not a 64-bit.
    Finally, you can always remote debug your program to see if you can narrow down where the crash is happening. Here are some instructions on how to do that (the instructions are for CVI 9.0, which is the oldest version for which I could find documentation online, but it should work the same way in 8.5).
    Luis

  • Points to keep in Mind

    We are starting to build our File to IDOC scenario.
    When I build this interface what are all the Points that I need to keep in mind to avoid any surprises at the end.
    Thanks.

    Hi Rohini,
    Based on the scenario, these are some of the points that you could keep in mind:-
    >With respect to content conversion - A sub structure must always be shown in exactly one line of the text document. The content conversion cannot create a nested structure. If you have a nested structure bring it down to a flat structure first.Content conversion is possible only till level three.
    >You can post the data into the R/3 system by either using BAPIs, RFCs, IDocs or proxies.
    >Since you have to validate and post the invalid files as error files, I think you will also have to use a bpm. You could have otherwise used adapter module processing for simple file validation. Check if you are going to use a switch in the bpm.
    >One of the most common errors that you face while using a switch is the return code=99 problem.
    >These are some of the don'ts which have been blogged by Felix Jeyareuben:-
    /people/sap.user72/blog/2005/12/08/don146ts-in-exchange-infrastructure
    Regards,
    Sushumna

  • I have garage band ver 10.0.2 and am trying to add effects to an audio track but i have no info button or track info under the track tab.  How do i get these things to show up on my program?

    I have garage band ver 10.0.2 and am trying to add effects to an audio track but i have no info button or track info under the track tab.  How do i get these things to show up on my program?

    In GarageBand 10.0.2 you can no longer add all kinds of effects freely; this GarageBand '11 feature has been discontinued. Pick one of the predefined patches that already has the effects you want.
    However, you can add effects from the predefined audio units.
    You'll see the predefined effects on the track, when you open the Smart Controls. To add audio units, click the button and enlarge the the smart controls pane by dragging the dividing line to the Track Area upwards.

  • Hi I am just now downloading Creative Clouds :-) as an upgrade from an old Creative Suite 5.5. Before that I hade a Creative suite 3 etc. Is it necessary that I keep all these old programs etc on my computer to make Creative Clouds work or is it better th

    Hi I am just now downloading Creative Clouds :-) as an upgrade from an old Creative Suite 5.5. Before that I hade a Creative suite 3 etc. Is it necessary that I keep all these old programs etc on my computer to make Creative Clouds work or is it better that I uninstall them? Kind regards, AnnaReet

    It is not necessary to retain the older installations.  YOu might want to consider if you will have any need for them in terms of working with older files, but other than that you can probably uninstall them without missing them.

  • HT2968 I can not update several of my apps that i have purchased a while back in my Apps Store on my MacPro. Because it keeps using my old @me account for iTunes and i don't remember the password or security question, Please help?

    I can not update several of my apps that i have purchased a while back in my Apps Store on my MacPro. Because it keeps using my old @me account for iTunes and i don't remember the password or security question, Please help?

    Hi AlphaCentori,
    If you are having issues accessing the Apple ID that was used to originally purchase those apps, you may find the following article helpful:
    Apple Support: Rescue email address and how to reset Apple ID security questions
    http://support.apple.com/kb/ht5312
    Regards,
    - Brenden

Maybe you are looking for

  • Not working properly - - Delay in Video/No audio

    Ok so I have a JVC GRDV500 camcorder. I tried to hook the camera up via firewire to chat on iChat with it. However, when I tried to conferences with someone, the video was very slow. It was almost delayed by about 5 seconds. The audio was very terrib

  • I have downloaded OSX v10.7 lion and i still can't get it to work I need help!!!

    I have downloaded OSX v.10.7 Lion 3 times...I have gone through all the steps downloaded installed everything and re started my computer and each time it does nothing! I am sick of this and really starting to hate my brand new " MacBookPro"....My fam

  • ICloud   Proxy (SOCKS): not so magical?

    Sensing an accelerating move away from 10.6 by Cupertino I bit the bullet and migrated three of my machines 10.6.8 to 10.7.3. These were done as clean installs with selective restores of data from Time Machine backups. I also migrated from MobileMe t

  • Opening MS Office files (Word, Excel etc) in Mail on iPad

    Have a new iPad so please forgive me if I ask the obvious ... Most my clients are on MS Office so when I get an email with a Word or Excel file, it's a problem as the iPad transfers it into a winmail.dat file which I can't open.  I've downloaded the

  • Hi,a question about transportation of translation of selection screen?

    Hi Experts, I am working on an ALV and there is a selection screen for it, and I have translate the texts in the selection screen and can they be transported while the program is transported to another system? if not how can I transport the translati