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...

Similar Messages

  • 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.

  • How can I solve out of memory error on excell file in PL/SQL

    Hi,
    I'm new on PL/SQL. One of the PL/SQL code which is created excell report got out of Memory error. The first reason of this error, excell file not supported more than 65536 data. So I change the excell file separeted sheets. So that the single sheet size cannot exceed 65536 data.
    All the data are held on system cach and if many user want to take the report the they would get an out of memory error.
    So I want to change the code like that; when out of memory exception raises,
    the old excell file save to disk and new excell file is created,
    and go on to write the new file without exiting the program.
    At the end of the data all the excell file append and show only one file to the user.
    I do know how to save the file and create a new file. But I don't know how can PL/SQL program to turn back to loop again when the exception occurs.
    Is anyone help me on this issue?
    Here is my code
    Thank you
    dworkbook:=hssfworkbook.new;
    dCurrentItem := Get_Block_Property(pCurrentBlock, FIRST_ITEM);     
    while not (name_in('system.last_record')='TRUE') loop
    /* The data would be written to the excell file column order. */
    if (dRow=0) then
              /* Create a new sheet */
    elsif (dRow <= dMaxWorksheetNum) then
         /* Data of the report are written here. The data are written in column order */
    if (dRow > dMaxWorksheetNum) then
         /* give dRow and dColumn intial value */
    /* increase worksheet number */
    end if; /* End of if (dRow=1) */
    if (isWritten) and not name_in('system.last_record')='TRUE'then
         /* if not at the end of the record and the previously read record is written to the file
         , then go to next record */
         next_record;
    end if;
    /* save excell report */
    workbookwriter.save(dworkbook,global.gethome||dFileName);
    web.show_document('/users/'||dFileName,'_BLANK');
    /* when exceptions occurs */
    EXCEPTION
    WHEN ORA_JAVA.EXCEPTION_THROWN THEN
    begin
         javaException := ORA_JAVA.LAST_EXCEPTION;
         -- Print out the Exception by using the toString()
         -- Method of the exception Object
         javaException2 := Exception_.new(javaException);
         mess(27002,Exception_.getMessage(javaException2));
         -- and clean up
         ORA_JAVA.CLEAR_EXCEPTION;
    exception
         WHEN ORA_JAVA.JAVA_ERROR THEN
    -- In this case, the error would be
    -- Argument 1 can not be null
    mess(27002,ORA_JAVA.LAST_ERROR);
    --Clean up
    ORA_JAVA.CLEAR_ERROR;
    end;
    WHEN ORA_JAVA.JAVA_ERROR THEN
    -- In this case, the error would be
    -- Argument 1 can not be null
    message(ORA_JAVA.LAST_ERROR);
    --Clean up
    ORA_JAVA.CLEAR_ERROR;

    No need to double-post... most questions are answered pretty quickly...

  • 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.

  • 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)

  • Out of Memory Error bcoz of xml file size

    Hi,
    Help me to solve this out of memory error, if xml file size
    is increased means
    it is not displaying anything and displaying this out of
    memory error.
    Thanking you
    Regards
    Nirmalatha.N

    You should avoid loading large sized XML files in your Flash
    Lite application. There is a limit on incoming data, and anything
    beyond that will give an error. My experience has been around 1000
    characters in a single stream of incoming text.
    A possible solution your memory problem is to use a middle
    language like PHP, ASP etc, to stream a single XML data file in
    parts to your Flash Lite application. This means you avoid loading
    XML directly in Flash.
    Mariam

  • Out of memory error - large project

    I'm consulting on a feature doc edit, and the primary editor (Avid guy) is having serious problems accessing anything from the original project.
    It's an hour and 15 minute show, with probably close to 100 hours of footage.
    The box is a D2.3 G5 with 1.5 g of RAM, and the media is on two G-Tech drives: a G-RAID and a G-Drive. Plenty of headroom on both (now) and the system drive is brand new, having been replaced after the original died, and there's nothing loaded on it but FC Studio. The FCP version is 5.1.4. The project file is well over 100 MB.
    We started getting Out of Memory errors with this large project, and I checked all of the usual suspects: CMYK graphics, hard drive space, sufficient RAM... all checked out okay, except possibly the less-than-ideal amount of RAM.
    I copied the important sequences and a couple of select bins to a new project, and everything seems workable for now. The project is still 90 MB, and I've suggested breaking it up into separate projects and work on it as reels, but we can edit and trims work efficiently at the moment. However, the other editor has gotten to a point now where he can't even open bins in the old, big project. He keeps getting the OOM error whenever he tries to do anything.
    I have no similar problems opening the same project on my G5, which is essentially identical except I have 2.5 G RAM (1 G extra). Can this difference in RAM really make this big a deal? Is there something else I'm missing? Why can't this editor access even bins from the other project?
    G4   Mac OS X (10.2.x)  

    Shane's spot on.
    What I often do with large projects is pare down, just what you have done. But 90 out of 100 is not a big paredown by any stretch. In the new copy throw away EVERYTHING that's outdated: old sequences are the big culprit. Also toss any render files and re-render.
    Remember that, to be effective fcp keeps EVERYTHING in ram, so that it can instantly access anything in your project. The more there is to keep track of the slower you get.

  • "out of memeory" error with Adobe Reader x & IE8

    Hello,
    Getting an "out of memory" error with Adobe Reader X & IE8. This is a locked down bank environment so upgrading to a higher version of Adobe is out of the question.
    I looked around on the web and noticed that many people are experiencing this "out of memory error" but no fix has been provided.
    Can you help?

    Thanks for the reply and suggestion - unfortunately, I get this error when I open Adobe Reader X itself in addition to launching a pdf within IE9 (my OS is Win7x64 Ultimate).  I can launch Adobe Reader X, but when I open any kind of PDF file (local copy, remote, web, etc...) the error dialog box pops up.  Everything seems functional with Reader, it's just a frustrating (er, irritating!) thing!  I think after the weekend I will 'give up' and remove the Reader X and go back to my 'old' (but functioning!) Reader - thanks for the comment and suggestion tho!

  • Overcoming Out of Memory Error

    hi, i need to initialize a 3 dimensional array at
    [21] [21] [500,000] = 220,500,000 * 8 bytes = 1,764,000,000 = 1.764 Gig
    its currently at 1/100 the size
    [21] [21] [5000] = 2,205,000 * 8 bytes = 17,640,000 = 17 Meg
    and working fine.
    I am getting an Out of Memory error with anything much higher.
    What is the max i can set the OS (windows 2000 or Xp) to accept?
    Thanks Alot!

    haha, thanks guys (or girls). thats what i figured.
    this is actually a graphing program that is reading in
    long strangely formatted files (3,000 lines)
    sorting and arranging them and then plotting them.
    Every plot requires at least 40 columns all with the same length
    (always above 2000).
    Someone persists that 5,000 plot points isnt enough so im
    humoring them and looking in to make it bigger.
    id think about plotting off the files themselves but in XP the
    plotting is ridiculously slow as it is. we're talking 2 or 3 second refreshs
    to load a jpanel with the plot.
    I think ill just let the user reconfigure WHERE the length will be
    as in, enter,
    [x] [y] [z] so you can do [ 1] [40] [ 55,000 ] or whatever
    as opposed to the standard [21][21][5000].
    thanks for your responses!

  • 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 when coverting large files using Web service call

    I'm running into an out of memory error on the LiveCycle server when converting a 50 meg Word document with a Web service call.  I've already tried increasing the heap size, but I'm at the limit for the 32 bit JVM on windows.  I could upgrade to a 64 bit JVM, but it would be a pain and I'm trying to avoid it.  I've tried converted the 50 meg document using the LiveCycle admin and it works fine, the issue only occurs when using a web service call.  I have a test client and the memory spikes when it's generating the web service call taking over a gig of memory.  I assume it takes a similar amount of memory on the receiving end which is why LiveCycle is running out of memory.  Does any one have any insight on why passing over a 50 meg file requires so much memory?   Is there anyway around this?
    -Kelly

    Hi,
    You are correct that a complete 64bit environment would solve this. The problem is that you will get the out of memory error when the file is written to memory on the server. You can solve this by creating an interface which stores large files on the server harddisk instead, which allows you to convert as large files as LC can handle without any memory issue.

  • RoboHelp 9 gives an out of memory error and crashes when I try to import or link a Frame 10 file or

    I have Tech Suite 3. If I start a new RoboHelp project and try to import or link Frame files, RoboHelp tries for a while, then I get an Out of Memory error and the program crashes.
    I opened one of the sample projects and was able to link to one of my frame files without any problem, so it seems to be an issue with creating something new.
    Any suggestions?

    It happens when I create a new project and then try to import or link frame docs to make up the content. It starts scanning, then crashes. I did get it to the conversion setting page once, but no further.
    It does not happen if I open one of the supplied example projects and link a file. But then it doesn't let me choose, during import, any style mapping. And I can't delete the sample project fold
    Twice now it has told me when I tried to import (not link, but import) that my .fm file could not be opened, and told me to verify that Frame is installed (it is) and that the file is a valid frame file (it is).
    The docs and project are in separate folders on my C: drive.

  • Uploading large files from applet to servlet throws out of memory error

    I have a java applet that needs to upload files from a client machine
    to a web server using a servlet. the problem i am having is that in
    the current scheme, files larger than 17-20MB throw an out of memory
    error. is there any way we can get around this problem? i will post
    the client and server side code for reference.
    Client Side Code:
    import java.io.*;
    import java.net.*;
    // this class is a client that enables transfer of files from client
    // to server. This client connects to a servlet running on the server
    // and transmits the file.
    public class fileTransferClient
    private static final String FILENAME_HEADER = "fileName";
    private static final String FILELASTMOD_HEADER = "fileLastMod";
    // this method transfers the prescribed file to the server.
    // if the destination directory is "", it transfers the file to
    "d:\\".
    //11-21-02 Changes : This method now has a new parameter that
    references the item
    //that is being transferred in the import list.
    public static String transferFile(String srcFileName, String
    destFileName,
    String destDir, int itemID)
    if (destDir.equals(""))
    destDir = "E:\\FTP\\incoming\\";
    // get the fully qualified filename and the mere filename.
    String fqfn = srcFileName;
    String fname =
    fqfn.substring(fqfn.lastIndexOf(File.separator)+1);
    try
    //importTable importer = jbInit.getImportTable();
    // create the file to be uploaded and a connection to
    servlet.
    File fileToUpload = new File(fqfn);
    long fileSize = fileToUpload.length();
    // get last mod of this file.
    // The last mod is sent to the servlet as a header.
    long lastMod = fileToUpload.lastModified();
    String strLastMod = String.valueOf(lastMod);
    URL serverURL = new URL(webadminApplet.strServletURL);
    URLConnection serverCon = serverURL.openConnection();
    // a bunch of connection setup related things.
    serverCon.setDoInput(true);
    serverCon.setDoOutput(true);
    // Don't use a cached version of URL connection.
    serverCon.setUseCaches (false);
    serverCon.setDefaultUseCaches (false);
    // set headers and their values.
    serverCon.setRequestProperty("Content-Type",
    "application/octet-stream");
    serverCon.setRequestProperty("Content-Length",
    Long.toString(fileToUpload.length()));
    serverCon.setRequestProperty(FILENAME_HEADER, destDir +
    destFileName);
    serverCon.setRequestProperty(FILELASTMOD_HEADER, strLastMod);
    if (webadminApplet.DEBUG) System.out.println("Connection with
    FTP server established");
    // create file stream and write stream to write file data.
    FileInputStream fis = new FileInputStream(fileToUpload);
    OutputStream os = serverCon.getOutputStream();
    try
    // transfer the file in 4K chunks.
    byte[] buffer = new byte[4096];
    long byteCnt = 0;
    //long percent = 0;
    int newPercent = 0;
    int oldPercent = 0;
    while (true)
    int bytes = fis.read(buffer);
    byteCnt += bytes;
    //11-21-02 :
    //If itemID is greater than -1 this is an import file
    transfer
    //otherwise this is a header graphic file transfer.
    if (itemID > -1)
    newPercent = (int) ((double) byteCnt/ (double)
    fileSize * 100.0);
    int diff = newPercent - oldPercent;
    if (newPercent == 0 || diff >= 20)
    oldPercent = newPercent;
    jbInit.getImportTable().displayFileTransferStatus
    (itemID,
    newPercent);
    if (bytes < 0) break;
    os.write(buffer, 0, bytes);
    os.flush();
    if (webadminApplet.DEBUG) System.out.println("No of bytes
    sent: " + byteCnt);
    finally
    // close related streams.
    os.close();
    fis.close();
    if (webadminApplet.DEBUG) System.out.println("File
    Transmission complete");
    // find out what the servlet has got to say in response.
    BufferedReader reader = new BufferedReader(
    new
    InputStreamReader(serverCon.getInputStream()));
    try
    String line;
    while ((line = reader.readLine()) != null)
    if (webadminApplet.DEBUG) System.out.println(line);
    finally
    // close the reader stream from servlet.
    reader.close();
    } // end of the big try block.
    catch (Exception e)
    System.out.println("Exception during file transfer:\n" + e);
    e.printStackTrace();
    return("FTP failed. See Java Console for Errors.");
    } // end of catch block.
    return("File: " + fname + " successfully transferred.");
    } // end of method transferFile().
    } // end of class fileTransferClient
    Server side code:
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    import java.net.*;
    // This servlet class acts as an FTP server to enable transfer of
    files
    // from client side.
    public class FtpServerServlet extends HttpServlet
    String ftpDir = "D:\\pub\\FTP\\";
    private static final String FILENAME_HEADER = "fileName";
    private static final String FILELASTMOD_HEADER = "fileLastMod";
    public void doGet(HttpServletRequest req, HttpServletResponse resp)
    throws ServletException,
    IOException
    doPost(req, resp);
    public void doPost(HttpServletRequest req, HttpServletResponse
    resp)
    throws ServletException,
    IOException
    // ### for now enable overwrite by default.
    boolean overwrite = true;
    // get the fileName for this transmission.
    String fileName = req.getHeader(FILENAME_HEADER);
    // also get the last mod of this file.
    String strLastMod = req.getHeader(FILELASTMOD_HEADER);
    String message = "Filename: " + fileName + " saved
    successfully.";
    int status = HttpServletResponse.SC_OK;
    System.out.println("fileName from client: " + fileName);
    // if filename is not specified, complain.
    if (fileName == null)
    message = "Filename not specified";
    status = HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
    else
    // open the file stream for the file about to be transferred.
    File uploadedFile = new File(fileName);
    // check if file already exists - and overwrite if necessary.
    if (uploadedFile.exists())
    if (overwrite)
    // delete the file.
    uploadedFile.delete();
    // ensure the directory is writable - and a new file may be
    created.
    if (!uploadedFile.createNewFile())
    message = "Unable to create file on server. FTP failed.";
    status = HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
    else
    // get the necessary streams for file creation.
    FileOutputStream fos = new FileOutputStream(uploadedFile);
    InputStream is = req.getInputStream();
    try
    // create a buffer. 4K!
    byte[] buffer = new byte[4096];
    // read from input stream and write to file stream.
    int byteCnt = 0;
    while (true)
    int bytes = is.read(buffer);
    if (bytes < 0) break;
    byteCnt += bytes;
    // System.out.println(buffer);
    fos.write(buffer, 0, bytes);
    // flush the stream.
    fos.flush();
    } // end of try block.
    finally
    is.close();
    fos.close();
    // set last mod date for this file.
    uploadedFile.setLastModified((new
    Long(strLastMod)).longValue());
    } // end of finally block.
    } // end - the new file may be created on server.
    } // end - we have a valid filename.
    // set response headers.
    resp.setContentType("text/plain");
    resp.setStatus(status);
    if (status != HttpServletResponse.SC_OK)
    getServletContext().log("ERROR: " + message);
    // get output stream.
    PrintWriter out = resp.getWriter();
    out.println(message);
    } // end of doPost().
    } // end of class FtpServerServlet

    OK - the problem you describe is definitely what's giving you grief.
    The workaround is to use a socket connection and send your own request headers, with the content length filled in. You may have to multi-part mime encode the stream on its way out as well (I'm not about that...).
    You can use the following:
    http://porsche.cis.udel.edu:8080/cis479/lectures/slides-04/slide-02.html
    on your server to get a feel for the format that the request headers need to take.
    - Kevin
    I get the out of Memory Error on the client side. I
    was told that this might be a bug in the URLConnection
    class implementation that basically it wont know the
    content length until all the data has been written to
    the output stream, so it uses an in memory buffer to
    store the data which basically causes memory issues..
    do you think there might be a workaround of any kind..
    or maybe a way that the buffer might be flushed after
    a certain size of file has been uploaded.. ?? do you
    have any ideas?

  • Out of memory error - from parsing a "fixed width file"

    This may be fairly simple for someone out there but I am trying to write a simple program that can go through a "fixed width" flat txt file and parse it to be comma dilmeted.
    I use a xml file with data dictionary specifications to do the work. I do this because there are over 430 fields that need to be parsed from a fixed width with close to 250,000 lines I can read the xml file fine to get the width dimensions but when I try to apply the parsing instructions, I get an out of memory error.
    I am hoping it is an error with code and not the large files. If it is the latter, does anyone out there know some techniques for getting at this data?
    Here is the code
       import java.io.*;
       import org.w3c.dom.Document;
       import org.w3c.dom.*;
       import javax.xml.parsers.DocumentBuilderFactory;
       import javax.xml.parsers.DocumentBuilder;
       import org.xml.sax.SAXException;
       import org.xml.sax.SAXParseException;
        public class FixedWidthConverter{
          String[] fieldNameArray;
          String[] fieldTypeArray;
          String[] fieldSizeArray;      
           public static void main(String args []){
             FixedWidthConverter fwc = new FixedWidthConverter();
             fwc.go();
             fwc.loadFixedWidthFile();
            //System.exit (0);
          }//end of main
           public void go(){
             try {
                DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
                DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
                Document doc = docBuilder.parse (new File("files/dic.xml"));
                // normalize text representation            doc.getDocumentElement ().normalize ();
                System.out.println ("Root element of the doc is " +
                     doc.getDocumentElement().getNodeName());
                NodeList listOfFields = doc.getElementsByTagName("FIELD");
                int totalFields = listOfFields.getLength();
                System.out.println("Total no of fields : " + totalFields);
                String[] fldNameArray = new String[totalFields];
                String[] fldTypeArray = new String[totalFields];
                String[] fldSizeArray = new String[totalFields];
                for(int s=0; s<listOfFields.getLength() ; s++){
                   Node firstFieldNode = listOfFields.item(s);
                   if(firstFieldNode.getNodeType() == Node.ELEMENT_NODE){
                      Element firstFieldElement = (Element)firstFieldNode;
                      NodeList firstFieldNMList = firstFieldElement.getElementsByTagName("FIELD_NM");
                      Element firstFieldNMElement = (Element)firstFieldNMList.item(0);
                      NodeList textFNList = firstFieldNMElement.getChildNodes();
                      //System.out.println("Field Name : " +
                               //((Node)textFNList.item(0)).getNodeValue().trim());
                      //loads values into an array
                      //fldNameArray[s] = ((Node)textFNList.item(0)).getNodeValue().trim();
                      NodeList typeList = firstFieldElement.getElementsByTagName("TYPE");
                      Element typeElement = (Element)typeList.item(0);
                      NodeList textTypList = typeElement.getChildNodes();
                      //System.out.println("Field Type : " +
                               //((Node)textTypList.item(0)).getNodeValue().trim());
                      //loads values into an array
                      //fldTypeArray[s] = ((Node)textTypList.item(0)).getNodeValue().trim(); 
                      NodeList sizeList = firstFieldElement.getElementsByTagName("SIZE");
                      Element sizeElement = (Element)sizeList.item(0);
                      NodeList textSizeList = sizeElement.getChildNodes();
                      //System.out.println("Field Size : " +
                               //((Node)textSizeList.item(0)).getNodeValue().trim());
                      //loads values into an array
                      fldSizeArray[s] = ((Node)textSizeList.item(0)).getNodeValue().trim();   
                   }//end of if clause
                }//end of for loop with s var
                //setFldNameArray(fldNameArray);
                //setFldTypeArray(fldTypeArray);
                setFldSizeArray(fldSizeArray);
                 catch (SAXParseException err) {
                   System.out.println ("** Parsing error" + ", line "
                      + err.getLineNumber () + ", uri " + err.getSystemId ());
                   System.out.println(" " + err.getMessage ());
                 catch (SAXException e) {
                   Exception x = e.getException ();
                   ((x == null) ? e : x).printStackTrace ();
                 catch (Throwable t) {
                   t.printStackTrace ();
          }//end go();
           public void setFldNameArray(String[] s){
             fieldNameArray = s;
          }//end setFldNameArray
           public void setFldTypeArray(String[] s){
             fieldTypeArray = s;
          }//end setFldTypeArray
           public void setFldSizeArray(String[] s){
             fieldSizeArray = s;
          }//end setFldSizeArray
           public String[] getFldNameArray(){
             return fieldNameArray;
          }//end setFldNameArray
           public String[] getFldTypeArray(){
             return fieldTypeArray;
          }//end setFldTypeArray
           public String[] getFldSizeArray(){
             return fieldSizeArray;
          }//end setFldSizeArray 
           public int getNumLines(){
             int countLines = 0;
             try {
                    //File must be in same director and be the name of the string below
                BufferedReader in = new BufferedReader(new FileReader("files/FLAT.txt"));
                String str;
                while ((str = in.readLine()) != null) {
                   countLines++;
                in.close();
                 catch (IOException e) {}    
             return countLines;
          }//end of getNumLines
           public void loadFixedWidthFile(){
             int c = getNumLines();
             int i = 0;
             String[] lineProcessed = new String[c];
             String chars;
             try {
                    //File must be in same director and be the name of the string below
                BufferedReader in = new BufferedReader(new FileReader("files/FLAT.txt"));
                String str;
                while ((str = in.readLine()) != null) {
                   //System.out.println(str.length());
                   lineProcessed[i] = parseThatLine(str);
                   i++;
                in.close();
                 catch (IOException e) {}     
                //write out the lineProcess[] array to another file
             writeThatFile(lineProcessed);
          }//end loadFixedWidthFile()
           public void writeThatFile(String[] s){
             try {
                BufferedWriter out = new BufferedWriter(new FileWriter("files/outfilename.txt"));
                for(int i = 0; i < s.length -1; i++){
                   out.write(s);
    }//end for loop
    out.close();
    catch (IOException e) {}
    }//end writeThatFile
    public String parseThatLine(String s){
    int start = 0;
    int end = 0;
    String parsedLine = "";
    int numChars = getFldSizeArray().length;
    //Print number of lines for testing
    //System.out.println(numChars);
    String[] oArray = getFldSizeArray();
    //String chars = oArray[0];
    //System.out.println(chars.length());
    //oArray
    for(int i = 0; i < numChars -1; i++ ){
    if(i == 0){
    start = 0;
    end = end + Integer.parseInt(oArray[i])-1;
    else
    start = end;
    end = end + Integer.parseInt(oArray[i]);
    parsedLine = parsedLine + s.substring(start, end) + "~";
    }//end for loop
    return parsedLine;
    }//End of parseThatLine
    I have tried to illeminate as many arrays as I can thinking that was chewing up the memory but to no avail.
    Any thoughts or ideas?
    Message was edited by:
    SaipanMan2005

    You should not keep a String array of all the lines of the file read.
    Instead for each line read, parse it, then write the parsed line in the other file:      public void loadFixedWidthFile() {
             BufferedReader in = null;
             BufferedWriter out = null;
             try {
                //File must be in same director and be the name of the string below
                in = new BufferedReader(new FileReader("files/FLAT.txt"));
                out = new BufferedWriter(new FileWriter("files/outfilename.txt"));
                String str;
                while ((str = in.readLine()) != null) {
                   //System.out.println(str.length());
                   str = parseThatLine(str);
                   //write out the parsed str to another file
                   out.write(str);
             catch (IOException e) {
                e.printStackTrace(); // At least print the exception - never swallow an exception
             finally { // Use a finally block to be sure of closing the files even when exception occurs
                try { in.close(); }
                catch (Exception e) {}
                try { out.close(); }
                catch (Exception e) {}
          }//end loadFixedWidthFile()Regards

  • Out of memory error when writing large file

    I have the piece of code below which works fine for writing small files, but when it encounters much larger files (>80M), the jvm throws an out of memory error.
    I believe it has something to do with the Stream classes. If I were to replace my PrintStream reference with the System.out object (which is commented out below), then it runs fine.
    Anyone else encountered this before?
         print = new PrintStream(new FileOutputStream(new File(a_persistDir, getCacheFilename()),
                                                                false));
    //      print = System.out;
              for(Iterator strings = m_lookupTable.keySet().iterator(); strings.hasNext(); ) {
                   StringBuffer sb = new StringBuffer();
                   String string = (String) strings.next();
                   String id = string;
                   sb.append(string).append(KEY_VALUE_SEPARATOR);
                   Collection ids = (Collection) m_lookupTable.get(id);
                   for(Iterator idsIter = ids.iterator(); idsIter.hasNext();) {
                        IBlockingResult blockingResult = (IBlockingResult) idsIter.next();
                        sb.append(blockingResult.getId()).append(VALUE_SEPARATOR);
                   print.println(sb.toString());
                   print.flush();
    } catch (IOException e) {
    } finally {
         if( print != null )
              print.close();
    }

    Yes, my first code would just print the strings as I got them. But it was running out of memory then as well. I thought of constructing a StringBuffer first because I was afraid that the PrintStream wasn't allocating the memory correctly.
    I've also tried flushing the PrintStream after every line is written but I still run into trouble.

Maybe you are looking for