Question
Problem Parsing Large File
Hi all,
I'm trying to parse out a large file (300 MB/Appox. 1 Mil. Records) for a project and insert the data into a database. I tried reading it using CFFile and it bombed out immediately because there wasn't enough heap memory(I think?). So, I tried using some Java I found to read the file one line at a time. I can get maybe halfway through it and the JVM memory maxes out (according to Server Monitor) and I get the following error:
java.lang.OutOfMemoryError: GC overhead limit exceeded
I know it has something to do with the way Java manages memory, but its beyond me for the moment. There's really nothing too fancy in what I'm doing, just reading through the file line by line, assigning the data I need to variables based on a record id code, and inserting/updating it into a database. I tried tweaking it to figure out what's eating up the memory and I think it has something to do with the database insert/updates. Is there another or better way I should be doing this? Do I need to adjust the memory somehow?
The Java I'm using to read the file is:
FileName="D:/XXX";
FileIOClass=createObject("java","java.io.FileReader");
FileIO=FileIOClass.init(FileName);
LineIOClass=createObject("java","java.io.BufferedReader" );
LineIO=LineIOClass.init(FileIO);
The server is a Quad Core Xeon, 4 GB of RAM, Windows Server 2003 SP2, CF 8 Enterprise.
Current Settings in Admin:
Max JVM Heap Size: 1280 MB
Max Perm Size: 256m
Max Size of Post Data: 512 MB
Request Throttle Memory: 1200 MB
I hope that's enough info to start.
Thank you
I'm trying to parse out a large file (300 MB/Appox. 1 Mil. Records) for a project and insert the data into a database. I tried reading it using CFFile and it bombed out immediately because there wasn't enough heap memory(I think?). So, I tried using some Java I found to read the file one line at a time. I can get maybe halfway through it and the JVM memory maxes out (according to Server Monitor) and I get the following error:
java.lang.OutOfMemoryError: GC overhead limit exceeded
I know it has something to do with the way Java manages memory, but its beyond me for the moment. There's really nothing too fancy in what I'm doing, just reading through the file line by line, assigning the data I need to variables based on a record id code, and inserting/updating it into a database. I tried tweaking it to figure out what's eating up the memory and I think it has something to do with the database insert/updates. Is there another or better way I should be doing this? Do I need to adjust the memory somehow?
The Java I'm using to read the file is:
FileName="D:/XXX";
FileIOClass=createObject("java","java.io.FileReader");
FileIO=FileIOClass.init(FileName);
LineIOClass=createObject("java","java.io.BufferedReader" );
LineIO=LineIOClass.init(FileIO);
The server is a Quad Core Xeon, 4 GB of RAM, Windows Server 2003 SP2, CF 8 Enterprise.
Current Settings in Admin:
Max JVM Heap Size: 1280 MB
Max Perm Size: 256m
Max Size of Post Data: 512 MB
Request Throttle Memory: 1200 MB
I hope that's enough info to start.
Thank you
