Results 1 to 1 of 1
- 06-28-2010, 01:30 PM #1Member
- Join Date
- Jun 2010
- Rep Power
large number of DB writes: java heap space problem in using transaction-commit
I'm writing a program that will be applied on a large DB (my DB server is mysql 5.1). My program has lots of updates and inserts. In order to decrease execution time I use "start transaction" and "commit" after every specific number of DB writes. My code is very efficient for small databases (for example having 200,000 records). But in larger databases (even as large as 1,000,000 records) JVM encounters a fetal error and the program terminates.
The error message is something about java heap space:
8192000 bytes requested from GrEt in growableArray.cpp
out of swap space...
I wonder what this problem is! I'm not creating any object in the code and I don't think using transactions make use of java Heap!
I also tried conn.setAutocommit(false) and conn.commit instead of direct commands for transaction start and commit but still the same problem exists.
changing the number of commands per transaction does not work also..
Would you please help me? :)
Thanks in advance,
- By rsiddharth in forum New To JavaReplies: 2Last Post: 02-23-2010, 03:59 PM
- By segolas in forum Advanced JavaReplies: 6Last Post: 01-14-2010, 12:29 PM
- By mvillara in forum NetworkingReplies: 3Last Post: 08-21-2009, 05:45 AM
- By hariprashanth in forum Advanced JavaReplies: 0Last Post: 12-18-2008, 12:42 PM
- By sandeeprao.techno in forum Advanced JavaReplies: 19Last Post: 10-30-2008, 12:27 PM