Getting the following ERROR when trying to profile app in WL

Questions about YourKit Java Profiler
Post Reply
nkashif
Posts: 3
Joined: Tue Jan 31, 2006 11:32 pm

Getting the following ERROR when trying to profile app in WL

Post by nkashif »

I downloaded latest evaluation version;

I get the following error when I try to take a snapshot and Weblogic quits after this, any ideas

Exception java.lang.OutOfMemoryError: requested 264820624 bytes for unsigned char in D:/BUILD_AREA/jdk142-update/ws/fcs/hotspot\src\
share\vm\prims\jvmpi.cpp. Out of swap space?

Any help will be greatly appreciated.
nkashif
Posts: 3
Joined: Tue Jan 31, 2006 11:32 pm

I am using following MEMORY ARGS

Post by nkashif »

folowing are the MEMORY ARGS I use to start Weblogic Server:

MEM_ARGS=-Xms768m -Xmx1100m
Vladimir Kondratyev
Posts: 1626
Joined: Tue Aug 10, 2004 7:52 pm

Post by Vladimir Kondratyev »

Profiling API of JVM 1.4.x doesn't work with such huge heaps. Please use JVM 1.5.0_06 with new JVMTI profiling API. It solves your problem.
nkashif
Posts: 3
Joined: Tue Jan 31, 2006 11:32 pm

Post by nkashif »

Thanks for the reply

we are using 1.4.x in production and wouldn't be upgrading to 1.5 anytime soon. is there any work around or I cannot use YourKit.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Post by Anton Katilin »

Hi,

Unfortunately there's no way to capture huge snapshots on Java 1.4. This limitation exists due to the JVM design.

The only workaround I may suggest is to decrease the values of -Xms and -Xmx. With smaller heaps profiling should work fine on Java 1.4.

Best regards,
Anton
markmiet
Posts: 1
Joined: Tue Feb 21, 2006 8:36 am

Maximum memory used by heap, when you can take snapshot

Post by markmiet »

What is maximum amount of memory used by heap when you can take snapshot without crashing weblogic(or any other program)?

I tried to take snapshot from production server(memory was used about 900 MB) and weblogic went to state UNKNOWN...

Java version is 1.4 and minimum/maximum heap size is 2 GB.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Post by Anton Katilin »

The exact numbers depend on contents of the heap: how many primitive arrays are there relative to the total number of objects etc.

It is usually OK to capture a 1G heap (i.e. -Xmx1024M). But once again, this may be different in your case.

This is a Java 1.4 core problem, and is cured only by using Java 5 JVM.
Post Reply