Out of memory prblem with threads

class B implements Runnable
If in class A I do
while(true)
B b = new B();
b.run()
It can create 10000 instances of B, with no problem. Since b is in the scope of the while, the old instance is cleaned up by the garbage collector every loop.
But if I do:
while(true)
B b = new B();
Thread t = new Thread(b);
t.start();
after around 400 loops I get out of memory.
If I add a finalize() method to B , I see it never called until the out of memory happens. This means the instances of the thread are not cleaned by the garbage collector.
Does anyone know why this is happening and what I can do to solve it?

An object is collectable if no path extists to it. One set of path is from the stack frames of all live threads. As each thread effectively holds a reference to itself, it is not suprising that the Thread instances aren't collected until the threads all end. Your rapid loop is obviously creating threads faster than they can complete (you don't show us what they are doing) so running out of memory is guaranteed.

Similar Messages

  • Out Of Memory Exception with Thread Pool

    Hi,
    I'm using the ThreadPooling, and I have a problem. In my usage, I submit a bunch of tasks to my application, and i have a pool of THREADS, so while executing these tasks i am getting the following errot :
    Exception in thread "pool-1-thread-271" java.lang.OutOfMemoryError: Java heap space
    I am not able to understand, what could be the reason to get this error, please help me
    any one who knows it .

    a few things to consider
    1. increasing the heap size
    2. you could have a memory leak
    3. your app could just be creating too many/large objects and need redesign

  • Out of memory Error with jdk 1.6

    Hello,
    I have a swing application launched on the client with the help of Java web start. The applications works fine in jre 1.4 and jre 1.5. The heap sizes are :
    initial-heap-size="5m" max-heap-size="24m"
    But when I run this using jre 1.6.0_05-b13, I am getting Out of memory Error, java heap size. And I see the memory usage is growing rapidly which I didn't notice in other jre versions (1.4 and 1.5).
    Does anyone have any idea on this?
    Thanks in advance,
    MR.

    Thanks for your response Peter. During my continuous testing I identified that error happens on jdk 1.5 also. And I have increased the min-heap-size to 24 MB and max-heap-size to 64 MB. But in that case also I noticed the out of memory error. The interesting thing is, the min-heap-size is never increased from 24MB and lot of free memory also.
    Memory: 24,448K Free: 12,714K (52%) ... completed.
    The Outofmemoryerror triggers from the reader thread which does the job of reading the data from the InputStream. One thing is we are continuously pushing more data on the output stream from the other end. Is that any limitation on InputStream which can hold some definite amount of data.
    Please throw some light on this.

  • Out of memory issues with PSE 8

    I am using PSE 8 64 bit on a Dell desktop computer with Intel (R) Core (TM) i7 CPU 920 at 2.67 GHz. with 8 GB of ram. My operating system is Windows 7, 64 bit.
    My problem is that I get out of memory or insufficient ram messages in PSE Editor with some PSE tools when my CPU resource utilization reaches 37 to 38%. In other words, even though my computer is telling me I have almost 4 GB of memory left, PSE is saying it does not have enough memory to complete the operation. It looks to me as if PSE is only using 4GB of my 8 GB of Ram. Is this true and what do I need to do to allow PSE to utilize all of my available ram.

    Thanks, that does answer what the problem is, but not necessarily a solution. I like working with 8 to 10 pictures (files) in the editor tray at a time. I make whatever changes needed to each and then group 4 or 5 into an 8.5 X 11 collage. Each picture in the collage is a separate layer and each separate picture may multiple layers of its own. I print the collage on 8.5 x 11 photo paper and then put the page in a photo album. I like the pictures in different sizes, orientations and sometimes shapes, so the album and multiple picture options offered in PSE are not much help. My process eats a lot of memory, which I mistakenly thought, my 8 gb of ram would solve.
    Anyway, now that I know the limitations, I can adjust the process to avoid the memory issue and hopefully, a future version of Elements will accommodate 64 bit.
    Maybe, I am wondering, do I need to look at other programs or am I missing a PSE function that would make my chore easier.

  • How can I trap Out- of-Memory data with no crash after Crop Tool fails to finish?

    The Photoshop 6 beta program froze while using the crop tool on an image size of 8052x5368. I tried to save a file in another program while waiting for the crop to finish (usually about 1 second) and got an out-of-memory error. I checked the D: driv where the file in the other program was saved. I have a flash C: drive and is not selected in the scratch disk preference. Two scratch disks, E: and G:, are selected with a total of about 800GB free space. After closing PS6Beta, the D: drive recovered about 164GB. The D: drive is not selected in the Scratch Disk list. I work with larger files and anticipate this problem again.How can I trap information for Adobe next time?
    Adobe Photoshop Version: 13.0 (13.0 20120305.m.415 2012/03/05:21:00:00) x32
    Operating System: Windows 7 64-bit
    Version: 6.1 Service Pack 1
    System architecture: Intel CPU Family:6, Model:14, Stepping:5 with MMX, SSE Integer, SSE FP, SSE2, SSE3, SSE4.1, SSE4.2, HyperThreading
    Physical processor count: 4
    Logical processor count: 8
    Processor speed: 2664 MHz
    Built-in memory: 16375 MB
    Free memory: 13523 MB
    Memory available to Photoshop: 3255 MB
    Memory used by Photoshop: 60 %
    Image tile size: 128K

    The problem remains for how the c: and d: drives were not selected in the scratch disk list. I tried again with only E: and G: drives and the file completed after 20 minutes with a 27.7G file. It would have been an ovious problem if the "info" diaglog box included the projected file size and/or dimensional units (px or in) because I use the dialog for verifying the size of the image. I wanted to make a 300 x400px image rather than a 300x400inch image( 90000x120000px).
    Thanks for your quick help.

  • Out Of Memory Problem With Creator 2

    Dear Community,
    I'm having a strange problem with JSC2. I have a not so big project (15 pages, more or less). I added a new page, and it raised a NullPointerException. Then the IDE stopped showing the outline window when selecting the Design View, and started to show Out of Memory Errors (java heap).
    At this time the IDE refuses to start. It gets stuck in the splash screen window, when appears the "opening main window" message. Then "java.exe" process starts to eat RAM up to the limit set in -Xmx startup switch. No matter how high I set this value, it will be taken, always showing the "Out of Memory (java heap)" error dialog. I have 1 Gb of RAM.
    It seems like a memory leak, but I suspect about corruption of either userdir or the project.
    Any hint will be welcome.
    Thank you in advance.
    Antonio.

    Got this before , it could be something to do with a dead Data Source.
    How i fixed the problem was to delete the following folder.
    C:\Documents and Settings\Administrator\.Creator\2_0
    Make sure you delete the .Creator folder not Creator
    Before you delete this folder make a backup of content.xml
    and jdbc-drivers folder so you dont ahve to and paste the back in once creator and recreate the folder
    So basically delete the folder , start creator and leave rebuild close and paste the files back into folder.
    Obviusly this is a drastic measure and your defaults will be set back to factory. But by keeping the backed up files as above you will not need to set up your datasources again. Perform at your own risk. Worked for me may not for you

  • Out of memory error with 80Kb file?

    Hi, my pc has 2Gb of Ram, a page file that is setup correctly
    and the physical ram is almost non-used (500Mb)
    When I start DW and load a php file of 80Kb approx., it just
    hangs/locks up. When I wait for it, it gives me an "out of memory"
    error, and when you look in windows task manager, it just keeps
    hogging up ram.
    My laptop is a "simple", 1Gb Hp pavillion, and when I open
    the file there, it just works like it's supposed to, using about
    70Mb of ram, instead of the gigabyte(s) it does on my developer
    machine....
    Adjusting virtual memory has absolutely no effect.. It seems,
    after some reading, that people using 2gb of ram, have the most
    problems in this area?
    Adobe, please help here !
    EDIT: i just tested another file, 136Kb large, that loads
    normal!, so it has to do with the files in specific... If you want
    to test the files, just download "Simplemachines Forum" and load
    the "load.php" or the "post.php" files from the source directory,
    to trigger the lockup...

    mmm... just tried using a "workaround" if you still can call
    it that
    Installed a virtual machine (xp) with less than 2gigs, and it
    works... I really hope someone else has got these kind of errors
    yet.... 2500$ + software, wich I can't use for now... Using
    notepad2 for time being...

  • Error "Out of Memory" Msg with Surface

    While viewing large files (100MB to 160MB) with the Adobe Reader Touch app on my MS Surface I frequently get an "Out of Memory" message.  Is there a way to avoid this?  in many instances i may only have 1 or 2 programs running at the same time.

    Is your MS Surface RT or Pro?  Files with size 100 MB to 160 MB sound exceptionally large.  How many pages does each document have?
    Would you share one of your large files with us at [email protected] (as an email attachment) so that we can diagnose the problem?  Thank you.

  • Out of memory error with last jvm

    Hi,
    i have written a program which run perfectly under java jre 1.4.2_03. But when I test it with the last java jre 1.4.2_05, I get a java.lang.OutOfMemoryError. Is there something different in the JVM?
    I have log out the garbage collector for the both JVM and it shows me that with the last java release the memory allocated is fully increasing. Trying to allocate more heap memory to the jvm do not change anything.
    Have any one an idea? or encounterd this problem?
    here is the listing from java142_03:
    [GC 511K->93K(1984K), 0.0158240 secs]
    [GC 17915K->16431K(25580K), 0.0235110 secs]
    [GC 18095K->16550K(25580K), 0.0187630 secs]
    [GC 18214K->16511K(25580K), 0.0095240 secs]
    [GC 18175K->16541K(25580K), 0.0100360 secs]
    [GC 18205K->16598K(25580K), 0.0085490 secs]
    [GC 18261K->16677K(25580K), 0.0088590 secs]
    Here is the listing from java142_05
    [GC 8652K->8347K(9012K), 0.0165860 secs]
    [Full GC 8347K->8347K(9012K), 0.5212970 secs]
    [GC 9435K->8789K(15068K), 0.0167740 secs]
    [GC 9877K->9222K(15068K), 0.0187010 secs]
    [GC 10310K->9654K(15068K), 0.0184040 secs]
    [GC 10742K->10084K(15068K), 0.0196390 secs]
    [GC 11172K->10511K(15068K), 0.0203420 secs]
    [Full GC 14101K->14101K(15196K), 0.7232510 secs]
    [GC 15643K->14695K(25200K), 0.2429610 secs]
    [GC 22448K->22157K(25200K), 0.0621640 secs]
    [GC 23757K->23582K(25200K), 0.0506020 secs]
    [GC 25182K->24892K(26608K), 0.0644240 secs]
    [Full GC[Unloading class sun.reflect.GeneratedMethodAccessor16]
    24892K->24892K(26608K), 1.1170130 secs]
    [GC 27695K->27186K(44560K), 0.4203820 secs]
    [GC 42058K->41883K(44816K), 0.0457160 secs]
    [Full GC 41883K->40172K(44816K), 2.3119850 secs]
    [GC 44268K->43989K(65088K), 0.0923610 secs]
    [GC 48085K->47342K(65088K), 0.1587490 secs]
    [GC 51438K->50693K(65088K), 0.1573160 secs]
    [GC 54789K->54044K(65088K), 0.1593800 secs]
    [GC 58140K->57396K(65088K), 0.1578900 secs]
    [Full GC 61492K->60747K(65088K), 2.5820780 secs]
    [Full GC 65087K->64298K(65088K), 2.6938250 secs]
    [Full GC 65087K->64944K(65088K), 2.6716200 secs]
    [Full GC 65087K->63781K(65088K), 3.4285840 secs]
    [Full GC 64664K->64504K(65088K), 2.6915320 secs]
    [Full GC 64504K->64504K(65088K), 2.6798100 secs]

    Maybe your program's memory usage is rubbing against the upper limit, and something about the latest JVM caused it to break through.
    Try using the command line parameter -mx500m (for 500 megs or whatever amount you neeed)

  • JDBC ResultSet out of memory problem with Scrollable one

    Hey guys,
    I'm facing the following problem when accessing an Oracle 10g database over oracle jdbc driver 1.4.
    I need to access the rows of a resultset (millions of rows) at least twice. Forward only doesn't need much memory - but I can't do a rs.beforeFirst()
    Switching to ResultSet.TYPE_SCROLL_SENSITIVE gives me always an java.lang.OutOfMemoryError: Java heap space exception after rs.next() and I can see the used memory constantly increasing.
    Here is my test code:
    conn = DriverManager.getConnection
    ("jdbc:oracle:thin:@host:1521:ORCL", "user", "pass");
    Statement my_stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
    ResultSet.CONCUR_READ_ONLY);
    ResultSet result = my_stmt.executeQuery("select * from stats_big");
    System.out.println("Query back :)");
    while(result.next()) {      //here happens the error after 200 000 rows
    //make statistics
    //ask user what to do
    result.beforeFirst();
    while(result.next()) {
         //apply function and deliver new values
    conn.close();
    Is the implementation caching all the already read rows in memory?
    Any help would be great,
    Alex

    if and how there are ways to read a Resultset 2 or more times
    forward-only and the data is not completelly cached on the client If the client reads a million rows, how can it read them a second time without either storing them somewhere on the client as in scrollable cursors, or rereading them from the server as in regular cursors. To me this looks like the laws of physics, rather than something that can be changed in a software release.
    In order of preference I would
    1. Not process a million rows on the client.
    2. Use a regular cursor and fetch it twice, the second fetch will be faster as the database already caches as much of it as it can.
    Fetching that much data somewhere is going to take some time anyway, which is why I prefer the first option..

  • Java heap out of memory error with -Xms1g -Xmx4g 64 bit VM

    We are getting Java Heap memory error for the application we are running on linux 64 bit machine (VM).
    The OOM came when heap usage was 1.7gb though we have specified min as 1gb and max as 4gb. If I understand correctly then it should not have been thrown as we have specified max as 4gb. If address space was the problem then it should have thrown swap space error.
    Also, there were no other processes running on this node.
    Below are the specifics of linux node we are using:
    linux kernel: 2.6.18-128.el5
    Linux Version: Red Hat Enterprise Linux Server release 5.3 (Tikanga) 64 Bit
    Ulimts
    [ppoker@aquariusvir11 ~]$ ulimit -a
    core file size (blocks, -c) unlimited
    data seg size (kbytes, -d) unlimited
    scheduling priority (-e) 0
    file size (blocks, -f) unlimited
    pending signals (-i) 139264
    max locked memory (kbytes, -l) unlimited
    max memory size (kbytes, -m) unlimited
    open files (-n) 100000
    pipe size (512 bytes, -p) 8
    POSIX message queues (bytes, -q) 819200
    real-time priority (-r) 0
    stack size (kbytes, -s) 10240
    cpu time (seconds, -t) unlimited
    max user processes (-u) 139264
    virtual memory (kbytes, -v) unlimited
    file locks (-x) unlimited
    Java Version
    [ppoker@aquariusvir11 ~]$ java -version
    java version "1.6.0_21"
    Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
    Java HotSpot(TM) 64-Bit Server VM (build 17.0-b16, mixed mode)
    Kernel Semaophores
    [ppoker@aquariusvir11 ~]$ ipcs -l
    ------ Shared Memory Limits --------
    max number of segments = 4096
    max seg size (kbytes) = 67108864
    max total shared memory (kbytes) = 17179869184
    min seg size (bytes) = 1
    ------ Semaphore Limits --------
    max number of arrays = 128
    max semaphores per array = 250
    max semaphores system wide = 32000
    max ops per semop call = 32
    semaphore max value = 32767
    ------ Messages: Limits --------
    max queues system wide = 16
    max size of message (bytes) = 65536
    default max size of queue (bytes) = 65536
    Please suggest what could be the reason for this error.
    Thanks,
    Ashish

    javaguy4u wrote:
    the OOM error ... wasn't coming when we had set min and max both as 4 GB.You deviously withheld that information.
    When the JVM needs to grow the heap it asks the OS for a bigger memory block than the one it has.
    The OS may refuse this and the JVM will throw an OOME.

  • Server goes out of memory when annotating TIFF File. Help with Tiled Images

    I am new to JAI and have a problem with the system going out of memory
    Objective:
    1)Load up a TIFF file (each approx 5- 8 MB when compressed with CCITT.6 compression)
    2)Annotate image (consider it as a simple drawString with the Graphics2D object of the RenderedImage)
    3)Send it to the servlet outputStream
    Problem:
    Server goes out of memory when 5 threads try to access it concurrently
    Runtime conditions:
    VM param set to -Xmx1024m
    Observation
    Writing the files takes a lot of time when compared to reading the files
    Some more information
    1)I need to do the annotating at a pre-defined specific positions on the images(ex: in the first quadrant, or may be in the second quadrant).
    2)I know that using the TiledImage class its possible to load up a portion of the image and process it.
    Things I need help with:
    I do not know how to send the whole file back to servlet output stream after annotating a tile of the image.
    If write the tiled image back to a file, or to the outputstream, it gives me only the portion of the tile I read in and watermarked, not the whole image file
    I have attached the code I use when I load up the whole image
    Could somebody please help with the TiledImage solution?
    Thx
    public void annotateFile(File file, String wText, OutputStream out, AnnotationParameter param) throws Throwable {
    ImageReader imgReader = null;
    ImageWriter imgWriter = null;
    TiledImage in_image = null, out_image = null;
    IIOMetadata metadata = null;
    ImageOutputStream ios = null;
    try {
    Iterator readIter = ImageIO.getImageReadersBySuffix("tif");
    imgReader = (ImageReader) readIter.next();
    imgReader.setInput(ImageIO.createImageInputStream(file));
    metadata = imgReader.getImageMetadata(0);
    in_image = new TiledImage(JAI.create("fileload", file.getPath()), true);
    System.out.println("Image Read!");
    Annotater annotater = new Annotater(in_image);
    out_image = annotater.annotate(wText, param);
    Iterator writeIter = ImageIO.getImageWritersBySuffix("tif");
    if (writeIter.hasNext()) {
    imgWriter = (ImageWriter) writeIter.next();
    ios = ImageIO.createImageOutputStream(out);
    imgWriter.setOutput(ios);
    ImageWriteParam iwparam = imgWriter.getDefaultWriteParam();
    if (iwparam instanceof TIFFImageWriteParam) {
    iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
    TIFFDirectory dir = (TIFFDirectory) out_image.getProperty("tiff_directory");
    double compressionParam = dir.getFieldAsDouble(BaselineTIFFTagSet.TAG_COMPRESSION);
    setTIFFCompression(iwparam, (int) compressionParam);
    else {
    iwparam.setCompressionMode(ImageWriteParam.MODE_COPY_FROM_METADATA);
    System.out.println("Trying to write Image ....");
    imgWriter.write(null, new IIOImage(out_image, null, metadata), iwparam);
    System.out.println("Image written....");
    finally {
    if (imgWriter != null)
    imgWriter.dispose();
    if (imgReader != null)
    imgReader.dispose();
    if (ios != null) {
    ios.flush();
    ios.close();
    }

    user8684061 wrote:
    U are right, SGA is too large for my server.
    I guess oracle set SGA automaticlly while i choose default installion , but ,why SGA would be so big? Is oracle not smart enough ?Default database configuration is going to reserve 40% of physical memory for SGA for an instance, which you as a user can always change. I don't see anything wrong with that to say Oracle is not smart.
    If i don't disincrease SGA, but increase max-shm-memory, would it work?This needs support from the CPU architecture (32 bit or 64 bit) and the kernel as well. Read more about the huge pages.

  • Out of memory on rhel 4

    Hi,
    I'm facing unregular but reccurent out of memory errors with Jrockit R27.2 and R27.6 (java 1.5).
    System is RHEL 4 (update 7) with 8Go of memory. 4Go are dedicated to hugepages (2000 * 2mo pages).
    When crash occurs, the system still have free memory. It can happen after 30min or after one week of load.
    JVM is running a tomcat server managing a webapp delivering "heavy" trafic : about 30-60 req/s and up to 100Mo allocated per second.
    I didn't find any clue about this issue. No specific system logs. Is there a known incompatibility with some versions of glibc or kernel ?
    What tests can I do to isolate the problem ?
    Regards,
    Bj
    My jvm configuration is as follow :
    export JAVA_OPTS="$JAVA_OPTS -Xmanagement:port=7091,ssl=false,authenticate=false -Djrockit.lockprofiling=false"
    export JAVA_OPTS="$JAVA_OPTS -d64 -Xms3584m -Xmx3584m -XlargePages -XXcompressedRefs=0"
    export JAVA_OPTS="$JAVA_OPTS -XXsetGC:genconcon -Xns160m -XXgcThreads:4"
    export JAVA_OPTS="$JAVA_OPTS -XXallocClearChunks -XXkeeparearatio=50"
    export JAVA_OPTS="$JAVA_OPTS -XXstaticCompaction -XXcompactRatio:10"
    export JAVA_OPTS="$JAVA_OPTS -XXtlasize:min=12k,preferred=128k -XXlargeObjectLimit:8k"
    export JAVA_OPTS="$JAVA_OPTS -XXlazyUnlocking -Djrockit.useAdaptiveFatSpin=true"
    export JAVA_OPTS="$JAVA_OPTS -XnoOpt"
    export JAVA_OPTS="$JAVA_OPTS -showversion -Xverify:none -XXexitOnOutOfMemory -XXnoSystemGC"
    Here's one stacktrace :
    java.lang.OutOfMemoryError: allocLargeArray - Object size: 351797264, Num elements: 351797248
    at jrockit/vm/Allocator.allocLargeArray(JIZ)Ljava/lang/Object;(Native Method)
    at jrockit/vm/Allocator.allocArray(JIZ)Ljava/lang/Object;(Unknown Source)
    at java/io/ByteArrayOutputStream.write(ByteArrayOutputStream.java:95)
    at java/io/ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1685)
    at java/io/ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java:1594)
    at java/io/ObjectOutputStream.writeObject0(ObjectOutputStream.java:1085)
    at java/io/ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
    at java/util/HashMap.writeObject(Ljava/io/ObjectOutputStream;)V(Unknown Source)
    at sun/reflect/GeneratedMethodAccessor562.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;(Unknown Source)
        at sun/reflect/DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java/lang/reflect/Method.invoke(Method.java:585)
        at java/io/ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917)
        at java/io/ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
        at java/io/ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
        at java/io/ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
        at java/io/ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
        at java/io/ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
        at java/io/ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
        at java/io/ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
        at java/io/ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
        at org/apache/catalina/cluster/session/DeltaRequest$AttributeInfo.writeExternal(DeltaRequest.java:347)
        at org/apache/catalina/cluster/session/DeltaRequest.writeExternal(DeltaRequest.java:264)
        at org/apache/catalina/cluster/session/DeltaManager.unloadDeltaRequest(DeltaManager.java:715)
        at org/apache/catalina/cluster/session/DeltaManager.requestCompleted(DeltaManager.java:1298)
        at org/apache/catalina/cluster/tcp/ReplicationValve.send(ReplicationValve.java:549)
        at org/apache/catalina/cluster/tcp/ReplicationValve.sendMessage(ReplicationValve.java:536)
        at org/apache/catalina/cluster/tcp/ReplicationValve.sendSessionReplicationMessage(ReplicationValve.java:518)
        at org/apache/catalina/cluster/tcp/ReplicationValve.sendReplicationMessage(ReplicationValve.java:428)
        at org/apache/catalina/cluster/tcp/ReplicationValve.invoke(ReplicationValve.java:362)
        at org/apache/catalina/valves/ErrorReportValve.invoke(ErrorReportValve.java:117)
        at org/apache/catalina/core/StandardEngineValve.invoke(StandardEngineValve.java:108)
        at org/apache/catalina/connector/CoyoteAdapter.service(CoyoteAdapter.java:151)
        at org/apache/jk/server/JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
        at org/apache/jk/common/HandlerRequest.invoke(HandlerRequest.java:283)
        at org/apache/jk/common/ChannelSocket.invoke(ChannelSocket.java:773)
        at org/apache/jk/common/ChannelSocket.processConnection(ChannelSocket.java:703)
        at org/apache/jk/common/ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
        at org/apache/tomcat/util/threads/ThreadPool$ControlRunnable.run(ThreadPool.java:685)
        at java/lang/Thread.run(Thread.java:595)
        at jrockit/vm/RNI.c2java(JJJJ)V(Native Method)
    -- end of trace
    JRockit aborted: Out of memory (68)
    Failed to acquire native memory. Try reducing Java heap size using -Xmx:<size> (i.e "-Xmx16m")                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hi,
    Thanks for your smart reply.
    I've looked to errors and I've objects from 2mo to 1.7go !?
    The size of the object doesn't seem to be significant but maybe the content.
    All errors happen during session replication. Maybe sometimes I have an huge/weird session.
    java.lang.OutOfMemoryError: allocLargeArray - Object size: 96206864, Num elements: 96206848
    java.lang.OutOfMemoryError: allocLargeArray - Object size: 2098192, Num elements: 1049086
    java.lang.OutOfMemoryError: allocLargeArray - Object size: 196345872, Num elements: 196345856
    java.lang.OutOfMemoryError: allocLargeArray - Object size: 419954704, Num elements: 419954688
    java.lang.OutOfMemoryError: allocLargeArray - Object size: 1738539024, Num elements: 1738539008
    java.lang.OutOfMemoryError: allocLargeArray - Object size: 2801680, Num elements: 2801664
    java.lang.OutOfMemoryError: allocLargeArray - Object size: 351797264, Num elements: 351797248
    java.lang.OutOfMemoryError: allocLargeArray - Object size: 206569488, Num elements: 206569472
    java.lang.OutOfMemoryError: allocLargeArray - Object size: 351272976, Num elements: 351272960
    java.lang.OutOfMemoryError: allocLargeArray - Object size: 289406992, Num elements: 289406976
    java.lang.OutOfMemoryError: allocLargeArray - Object size: 351797264, Num elements: 351797248
    Regards,
    Bj

  • Jrockit out of memory error

    We are getting out of memory error with jrockit1.4.2_08. We used memory debugger tools to find the leak. Apparently there do not seem to be a leak from application perspective. Here is the core dump. Please help me resolve this.
    ===== BEGIN DUMP =============================================================
    JRockit dump produced after 0 days, 05:37:55 on Thu Jun 5 20:39:11 2008
    Additional information is available in:
    /opt/obs/obs_app/obs31.0/user_projects/admin/jrockit.17430.dump
    No core file will be created because core dumps have been
    disabled. To enable core dumping, try "ulimit -c unlimited"
    before starting JRockit again.
    If you see this dump, please open a support case with BEA and
    supply as much information as you can on your system setup and
    the program you were running. You can also search for solutions
    to your problem at http://forums.bea.com in
    the forum jrockit.developer.interest.general.
    Error code: 52
    Error Message: Null pointer exception in native code
    Signal info : si_signo=11, si_code=2
    Version : BEA WebLogic JRockit(TM) 1.4.2_08 JVM R24.5.0-61 ari-49095-20050826-1856-linux-ia32
    Threads / GC : Native Threads, GC strategy: parallel
    : mmHeap->data = 0x40416000, mmHeap->top = 0x7ec16000
    : mmStartCompaction = 0x45236000, mmEndCompaction = 0x4a056000
    CPU : Intel Pentium 4 (HT)
    Number CPUs : 4
    Tot Phys Mem : 4021997568
    OS version : Red Hat Enterprise Linux ES release 2.1 (Panama)
    Linux version 2.4.9-e.72smp ([email protected]) (gcc version 2.96 20000731 (Red Hat Linux 7.2 2.96-129.7.2)) #1 SMP Tue Jul 3 22:04:51 EDT 2007
    State : JVM is running
    Command Line : -Djava.class.path=<my own jars list>
    java.library.path=/opt/obs/wls/jrockit-j2sdk1.4.2_08/jre/lib/i386/jrockit:/opt/obs/wls/jrockit-j2sdk1.4.2_08/jre/lib/i386:/opt/obs/wls/jrockit-j2sdk1.4.2_08/jre/../lib/i386:/opt/mqm/java/lib:/opt/tib/rv7.1.2/lib:/opt/obs/obs_app/obs31.0/thirdparty:/opt/obs/wls/wls8.1sp3/weblogic81/server/lib/linux/i686:/opt/obs/wls/wls8.1sp3/weblogic81/server/lib/linux/i686/oci920_8
    C Heap : Good; no memory allocations have failed
    Registers (from context struct at 0x8d5b724/0x8d5b80c):
    EAX = 000005f4 EBX = 0000007f
    ECX = 7ff8bd90 EDX = 24a18f94
    ESI = 7ff46af0 EDI = 00000100
    ESP = 7f262bc0 EIP = 4026d58f
    EBP = 7f262bd8 EFL = 00010203
    CS = 0023 DS = 002b ES = 002b
    SS = 002b FS = 00df GS = 00df
    Stack:
    7f262bc0 :00000000 7ff46af0 00000f94 00000000 00028000 00000000
    7f262bd8 :7f262c08 401ffcae 7ff8bd90 24a18f94 00028000 a0000000
    7f262bf0 :0a5f1800 7f262c74 08d137a0 00000050 00000000 7f262c34
    7f262c08 :7f262c48 4028a7fb 24a18f94 00000000 08d137a0 08d139e4
    7f262c20 :581a664c 00000003 08d137a0 00000001 7f262c74 00000000
    7f262c38 :7f262ca8 402c28bd 7f262c74 20040144 7f262ca8 402c292f
    7f262c50 :7f262c74 00000000 00000000 7f262c84 581a6640 08d137a0
    7f262c68 :08d1382c 414d2db8 210d41e8 0a5f1800 08d137a0 7f262d9c
    7f262c80 :24a18f95 00000002 00000000 7f262cf8 08d1382c 581a6640
    7f262c98 :00000000 00000000 00000000 00000000 7f262ce8 402e0861
    7f262cb0 :08d137a0 581a6640 00000020 7f262cf8 210cc499 00000001
    7f262cc8 :00000000 7f262ce4 08d139e8 7f262cf0 581a66c0 53b8d780
    7f262ce0 :00000000 00000020 08d137a0 210cc43e 08d1382c 08d139e4
    7f262cf8 :08116840 08d139e4 00000000 581a6400 210b41ff 00000001
    7f262d10 :581a6618 581a6560 210cc499 581a6565 581a6618 581a6560
    7f262d28 :210d2744 581a62f0 581a6560 210d2725 2112a995 2112a985
    7f262d40 :2112a975 23a67584 581a6578 00000001 00000001 220e35a9
    7f262d58 :23a53381 581a62f0 00000000 00000000 581a6548 00000046
    7f262d70 :00000000 00000002 00000000 581a62f0 00000001 00000000
    7f262d88 :00000000 00000000 581a6530 581a62f0 23a56e15 24a18f95
    7f262da0 :24a18ba3 00000000 581a6130 210bead9 581a6038 581a6038
    7f262db8 :581a6038 53b88f50 40fa9ca8 581a6308 55b54b00 40fa9c38
    7f262dd0 :80000000 55a06030 581a6020 581a6038 581a6020 24a189bb
    7f262de8 :40fa9c38 581a6020 40fa9ca8 581a60c0 55a06030 53942ff8
    7f262e00 :55b54b00 40fa9ca8 40fa9c38 08d137a0 7f262e24 210b34d8
    7f262e18 :40fa9c38 40fa9c68 40fa9ca8 24a18800 402e3a4d 7f262fb3
    7f262e30 :0000002c 00000003 7f262ec4 08d1382c 24b196e0 249c4f84
    7f262e48 :581a5390 00000000 00000058 7f262e84 402b861a 249c4f84
    7f262e60 :7f262e80 08d1382c 00000001 00000001 00000008 00000013
    7f262e78 :00000005 581a5fd8 08d139dc 7f262e18 00000003 00000005
    7f262e90 :00000005 00000000 00000000 55a06030 55b54b00 7f262e24
    7f262ea8 :7f262e24 08d137a0 7f262ee0 24a18800 210b34a0 0000002c
    7f262ec0 :7f262fb3 7f262f04 402c8931 08d1382c 1aea85c0 24b196e0
    7f262ed8 :00000000 7f262f5c 402c8b74 7f262f54 401aaab0 00000000
    7f262ef0 :7f262f5c 7f262f54 401aaab0 401aa6a0 1aea85c0 7f262f64
    7f262f08 :402c8c41 08d1382c 249c4f84 00000000 7f262f5c 402c8b74
    7f262f20 :00000000 7f262f54 08d13dd0 08d1382c 7f262f9c 00000000
    7f262f38 :00000000 7f262f7c 402f2b2d 08d137a0 00000001 7f262f7c
    7f262f50 :402f2b24 08d13dd0 402f2b24 7f262fd4 08d1382c 7f262f94
    7f262f68 :402dbd4c 08d1382c 08d139dc 249c4f84 7f262fd4 08d139e4
    7f262f80 :581a5ee0 00000000 476bd4c0 210b67f6 00000000 08d137a0
    7f262f98 :210e7b1b 08d1382c 08d139e0 249c4f84 08d139dc 7f262fd4
    7f262fb0 :083e6898 08d139dc 00000000 210eb30d 40fa9ca8 210eb184
    7f262fc8 :405bff10 00000005 210e7c48 581a5fb8 581a5fb8 581a5fe0
    7f262fe0 :00000000 00000000 581a5690 210e7253 581a5fb8 00000009
    7f262ff8 :73a44aa8 73a44aa8 00000005 581a5fb8 00000009 581a5690
    7f263010 :246e7cd0 581a5fb8 581a53e8 581a5f48 40fa9b90 40fa9be8
    7f263028 :55a06030 55b54b00 40fa9be8 40fa9bd0 246e7b13 55b54b00
    7f263040 :55a06030 40fa9b60 55b54b00 55a06030 581a5378 246e79b6
    7f263058 :55a06030 55b54b00 57712968 405c6858 40fa9b40 00000001
    7f263070 :40fa9b40 2426bab4 55a06030 57712968 57712928 57712968
    7f263088 :55b54b00 55b54b00 4b345448 2426ba1b 2426b717 53b88f50
    7f2630a0 :405c6858 5393c038 53b88f50 00000002 53b88f40 24266f1f
    7f2630b8 :53b88f50 53b88f50 53b88f40 5393c038 53b849c0 00000000
    7f2630d0 :53912b90 5393acd0 5393c038 53912b90 242613c8 5393c038
    7f2630e8 :00000000 5393acd0 00000000 5393aa60 5393c038 24658a31
    7f263100 :5393acd0 4a0dbf40 00000000 4a0dbf40 539125c0 23a74a88
    7f263118 :539126e8 00000001 6553be00 539125c0 246587dc 53ebb610
    7f263130 :4a0dbf40 00000000 4a124210 00000000 00000000 5393aa60
    7f263148 :218aff64 09ccec00 221aa582 5393a440 4a1507e8 4a1507e8
    7f263160 :536f07d8 533cdee0 5393a440 533cdee0 000378b6 536f07d8
    7f263178 :5393a430 00000004 210b48f0 00000050 0000000f 211080dd
    7f263190 :40576ec8 21108145 5393a480 5393aa60 5393aa60 21108074
    7f2631a8 :00000003 536f07d8 4a124210 7d1c9048 5393a430 654d5040
    7f2631c0 :4a090428 232a5328 7d1c9048 4a124210 229f2aeb 7d1c9048
    7f2631d8 :4a124210 4a127090 538f80a8 654d5040 536f07d8 4a127090
    7f2631f0 :536f07d8 242438f0 536f07d8 7d1c9048 7d1c9048 538f80a8
    7f263208 :5393a418 7d1c9048 229f2a12 536f07d8 7d1c9048 22147208
    7f263220 :40528fa8 4056b138 00000000 00000000 405d4858 7d1c9048
    7f263238 :2214718a 5393a418 7d1c9048 229f239d 5393a418 536f07d8
    7f263250 :7d1c9048 4056b138 41356f20 00000000 536f07d8 40528fa8
    7f263268 :4a127090 7d1c9048 5393a418 538f80a8 42562b68 538f81e0
    7f263280 :229f2230 219161d1 41356f20 218e2089 42562b6d 41356f20
    7f263298 :7f2632b4 210b8c73 402e37ef 7f2633e8 08d137a0 7f2632b4
    7f2632b0 :210b3478 210b8c60 402e3a4d ffffffff 00000010 00000000
    7f2632c8 :7f263354 08d1382c 200920e0 200282cc 00000000 00000000
    7f2632e0 :00000000 7f263314 402b861a 200282cc 7f263310 08d1382c
    7f2632f8 :00000001 00000001 00000006 00000006 00000001 08d137a0
    7f263310 :00000000 7f2632b4 00000000 00000001 00000001 00000000
    7f263328 :00000000 00000000 42562b68 7f2632b4 7f2632b4 08d137a0
    7f263340 :00000000 210b8c60 210b3440 00000010 ffffffff 7f263394
    7f263358 :402c8931 08d1382c 080d97e0 200920e0 00000000 7f2633e8
    7f263370 :402e3550 7f2633cc 00000000 08d1382c 08d1382c 7f263aac
    7f263388 :00000000 00000000 080d97e0 7f2633d4 402c9e9f 08d1382c
    7f2633a0 :200282cc 00000000 7f2633e8 402e3550 00000001 7f2633cc
    7f2633b8 :00000000 00000000 00000000 00000000 00000000 00000000
    Code:
    4026d48f :83403d9a 008bf4c4 166be850 c4830009 f4c48310 a817e853
    4026d4a7 :b70f0009 c0010643 06438966 0ff8c483 048dc0b7 02e0c140
    4026d4bf :08438b50 57b7e850 43890003 20c48308 53f4c483 09a87ce8
    4026d4d7 :9a38a100 8b64403d 30050300 83403d9a c48310c4 50008bf4
    4026d4ef :0915f4e8 084b8b00 4574c985 0f0c558b 8d0443b7 14894004
    4026d507 :10558b81 0443b70f c140048d 430302e0 04508908 0f14558b
    4026d51f :8d0443b7 e0c14004 08430302 66085089 b80443ff 00000001
    4026d537 :b48d09eb 00000026 8bc03100 ec89e85d 768dc35d e5895500
    4026d54f :570cec83 458b5356 08558b08 00fc45c7 83000000 b70ff4c4
    4026d567 :478d0478 8df8d101 e852ff58 0009a7ed 8310c483 4974fffb
    4026d57f :084d8b90 8b5b148d 048d0841 0c558b90 77045039 0850391c
    4026d597 :188b0f72 51f4c483 09a7fce8 ebd88900 fc5d892e 768d05eb
    4026d5af :8bdf8900 de89fc4d 8939148d 1fe8c1d0 d1101c8d 75f339fb
    4026d5c7 :08458bb8 50f4c483 09a7cce8 8dc03100 5e5be865 5dec895f
    4026d5df :e58955c3 571cec83 458b5356 fc45c70c 00000000 04788366
    4026d5f7 :c7627400 0000f845 558b0000 f8458b0c 8b084203 8b118b08
    4026d60f :388b0442 8b08428b 8b028b30 f8c48300 8b04598b 08418b10
    4026d627 :5040d829 145d2b52 52575653 10458b53 2c406850 558b4036
    4026d63f :bae85208 8bc7ddb3 c4830c55 f8458330 fc45ff0c 0442b70f
    4026d657 :7cfc4539 d8658da5 895f5e5b 89c35dec e58955f6 572cec83
    4026d66f :38a15356 64403d9a 0503008b 403d9a30 8bf4c483 5ee85000
    4026d687 :83000914 c48310c4 e45d8df4 19bbe853 b2e80009 e8000918
    Loaded modules:
    (* denotes the module causing the exception)
    0x08048000-0x0804ce46 /opt/obs/wls/jrockit-j2sdk1.4.2_08/bin/java
    0x4001d000-0x40029fab /lib/i686/libpthread.so.0
    0x4004e000-0x4006fb42 /lib/i686/libm.so.6
    0x40071000-0x4007300c /lib/libdl.so.2
    0x40075000-0x401a76e5 /lib/i686/libc.so.6
    0x401b2000-0x40388eef* /opt/obs/wls/jrockit-j2sdk1.4.2_08/jre/lib/i386/jrockit/libjvm.so
    0x7ec57000-0x7ec66fa5 /opt/obs/wls/jrockit-j2sdk1.4.2_08/jre/lib/i386/libverify.so
    0x7ec75000-0x7ec94a0f /opt/obs/wls/jrockit-j2sdk1.4.2_08/jre/lib/i386/libjava.so
    0x7ec9c000-0x7ecae3ba /lib/libnsl.so.1
    0x7ec97000-0x7ec98705 /opt/obs/wls/wls8.1sp3/weblogic81/server/lib/linux/i686/libweblogicunix1.so
    0x7f5f2000-0x7f5f3eff /opt/obs/wls/wls8.1sp3/weblogic81/server/lib/linux/i686/libmuxer.so
    0x7f5f6000-0x7f5f95c1 /opt/obs/wls/jrockit-j2sdk1.4.2_08/jre/lib/i386/libioser12.so
    0x80318000-0x8031f8bf /opt/obs/obs_app/obs31.0/thirdparty/libXMLC.so
    0x80344000-0x8034c66f /opt/tib/rv7.1.2/lib/libtibrvj.so
    0x8034e000-0x803563e0 /opt/tib/rv7.1.2/lib/libtibrvcmq.so
    0x803d2000-0x803e66bb /opt/tib/rv7.1.2/lib/libtibrvcm.so
    0x7fef9000-0x7fefdcaf /opt/tib/rv7.1.2/lib/libtibrvft.so
    0x803e8000-0x804341a4 /opt/tib/rv7.1.2/lib/libtibrv.so
    Thread Stack Trace:
    WARNING: Memory exhausted
    at java/lang/Throwable.fillInStackTrace0(Native Method)@0x210cc3f0
    at java/lang/Throwable.fillInStackTrace(Unknown Source)@0x210cc499
    at java/lang/Throwable.<init>(Unknown Source)@0x210d2744
    at java/lang/Exception.<init>(Exception.java:41)@0x210d2725
    at java/lang/RuntimeException.<init>(RuntimeException.java:43)@0x2112a995
    at java/lang/IllegalArgumentException.<init>(IllegalArgumentException.java:36)@0x2112a985
    at java/lang/NumberFormatException.<init>(NumberFormatException.java:38)@0x2112a975
    at java/lang/NumberFormatException.forInputString(NumberFormatException.java:48)@0x23a67584
    at java/lang/FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1207)@0x220e35a9
    at java/lang/Double.parseDouble(Double.java:220)@0x23a56e15

    I can't tell from the crash dump what the exact problem is - maybe you are running out of native memory?
    You are running a very old JRockit version. Since you are a Oracle/BEA customer, you can get a newer one from BEA Support, or through edelivery.oracle.com.
    -- Henrik

  • Out of Memory error on some PDF's, not all PDF's.

    Hi there,
    I have read most of the posts in the forums that relate to 'Out of Memory' issues with PDF's and I have to say that there is still no solution that I have found.
    I have tried reinstalling Adobe Reader, Flash Player and tried clearing my Temp Files. None of these fixed the issue.
    The PDF's that receive this memory error are downloaded off a CMS website that has many offices and logins. Only one office is experiencing this out of memory issue so we know that it is not an issue with generating the PDF's on the CMS website, otherwise all the offices and logins would have this issue, since they use the same system.
    I am an admin of that CMS website and even I receive the same out of memory issue when I try and view the PDF's from that office, as the customer does.
    When we open these PDF's with another PDF reading program, the PDF's open fine. So that tells me that the issue lies with Adobe Reader and not the PDF file itself.
    These PDF files that are receiving the error about 1MB-4MB, so they are not large.
    Could you please tell me the solution to this out of memory error as we may lose a customer because your product is producing an error that does not seem to have been fixed after years of being reported by your customers.
    Thanks.

    As an Adobe Reader XI user, if I may put my two cents in, that "Out of Memory" problem is not with the Adobe Reader XI application, which was installed on our computers! I think, the problem is with how the PDF documents, which we were trying to open, were generated (or regenerated).
    I remember I was able to open my old credit card statement online without any problem and now I am not able to open the same old statement (out of memory) because it could have been regenerated! In fact, I could not open any of my credit card statements (old or new) on this specific credit card web site, which makes me believe those statments were regenerated or somthing with some new Adobe software.
    As others mentioned, even I'm able to view other PDF documents without any problem.

Maybe you are looking for