java heap memory allocation

Our B2B server has the following java heap memory option : -ms1000M -mx1500M

To make me embarrass is the server suddenly breaks down. I don’t know the reason.
The server transacts 1000 documents per day.
Average document size is approximately 2kbyte.

Our physical memory is 4 Gbyte.
Also, occasionally we encounter java.lang.outOfMemory errors. Out JVM is Sun’s jdk1.3.
If I expand the heap memory option greater than -ms1000M or mx1500M, it breaks down with the java.lang.outOfMemory error message.

What should I do?
If I should expand the heap memory, how can I do it?

Thank you for your help in advance.

We have had this happen on both our UNIX and Windows NT/2000 B2B Servers. The wM Support/Customer Care team told us to set up a new java service, something like memoryGarbageCollect. It has a single line in it – System.gc();

Save this and then you can schedule it to run periodically – every four hours or how often you need to run it.

You can see the memory use by looking at the Server → Statistics screen from the Admin GUI.

Which B2B server version are your running, and which java VM are you using?

As far a garbage collection goes we have set garbage collection to occur once every 5 minutes.

The version of my B2B server is 4.0.
JVM is Sun’ jdk 1.3.

I’m running System.gc() every 5 minutes and inserted the garbage collecing service(System.gc()) in the flow service so that whenever the document flows inside, the server can invoke garbage collecting service.

The interesting fact is that usually every 2 or 3 days the sever breaks down.
I can’t find out the reason of this problem.
Where can I find it?

The same thing happens to us on 3.0.1 server. It runs fine for 2-3 days normally and gets the outofMemory exception. Even we are looking into to have a cron job to do garbage collect. Hope it helps.

You should also give IBM’s JDK1.3 a try! I’m running a 4.0.1 Server with it sometimes for month without a restart (and without an explicit System.gc(), which the JVM should do all by its own anyway).
Cheers, Ulrich

Ulrich,
On which platform are you running IBM’s JDK1.3?

Thanks in advance.
Dave

There is a more slick way to perform the gc using the scheduler…see my response “RE: how to read statistics log”…if you follow this approach you can run a scheduled job and only do gc when necessary.