We have a situation where we will be running Java agents using the Agent.runonserver method. This will be happening a lot, and by many, so it won’t be uncommon for many people to be running these agents in this way at the same time. Does each run of an agent have it’s own heap, or is there only one heap for all to use?
I ask because we sometimes get outofmemoryerror errors (which crash the server), and this seems like it might be hapening more often when there are several people running the agents at the same time…
I have used the getRunTime method to check the max, total, and free memory at various times in the code, and it looks like each instance of an agent has it’s own heap… but it’s hard to tell.
Right now I am figuring that it’s one heap for everyone so I have alocated maxheapsize to 450MB; is this a mistake?
Thanks for any help.
Kevin