Bluehost.com Web Hosting $6.95

JDBC out of memory error

This is a discussion on JDBC out of memory error within the MySQL Database forums, part of the Database Forums category; I'm using the standard JDBC driver (mysql-connector-java-5.0.4-bin.jar) and I'm getting out ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-01-2007
Chris
 
Posts: n/a
Default JDBC out of memory error

I'm using the standard JDBC driver (mysql-connector-java-5.0.4-bin.jar)
and I'm getting out of memory errors.

I'm doing a large select on a 3 million row table. It was my
understanding that if you added a few params when creating the
Statement, the driver wouldn't try to load the whole thing in memory:

queryStatement = con.createStatement(ResultSet.TYPE_FORWARD_ONLY,
ResultSet.CONCUR_READ_ONLY);
queryStatement.setFetchSize(100);

Doesn't seem to work.

I'd rather not have to rewrite the app to grab rows in small chunks.
This is a single-user, batch processing app, so locking is not an issue.

What am I doing wrong?
Reply With Quote
  #2 (permalink)  
Old 03-02-2007
Uwe Plonus
 
Posts: n/a
Default Re: JDBC out of memory error

Chris wrote:
> I'm using the standard JDBC driver (mysql-connector-java-5.0.4-bin.jar)
> and I'm getting out of memory errors.
>
> I'm doing a large select on a 3 million row table. It was my
> understanding that if you added a few params when creating the
> Statement, the driver wouldn't try to load the whole thing in memory:
>
> queryStatement = con.createStatement(ResultSet.TYPE_FORWARD_ONLY,
> ResultSet.CONCUR_READ_ONLY);
> queryStatement.setFetchSize(100);
>
> Doesn't seem to work.
>
> I'd rather not have to rewrite the app to grab rows in small chunks.
> This is a single-user, batch processing app, so locking is not an issue.
>
> What am I doing wrong?


How do you call your java program? Do you supply any memory settings to
the VM?

By default the VM is running with 64 MB of memory which may be less than
needed.

Uwe
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 06:25 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0