heap space error

  • Hi,

    I've written a java application - that makes a JDBC connection to the database, and when run it gives the following exception:

    The system is out of memory. Use server side cursors for large result sets:Java heap space. Result setsize:424,266,419. JVM total memory size:66,650,112.

    What do I need to do, to resolve this error?

    😉

  • This is an error whereby, the result query (SELECT * FROM X) has given

    more data than there is memory available in the system to handle.

    Either that, or look at using an SQL query that is limited (ie, use

    the incremental crawl). This way, you will get less data back and the

    device will have a better handle on what's going on.

    Better way would be(as suggested too) to use a server side cursor(http://www.mssqlcity.com/Articles/General/UseCursor.htm) and loop through a set of records and get your time in increments rather than at one go.

    HTH

    MJ

  • Hello

    I can confirm that the query I am trying to execute is of this format, (select * from x).

    can you maybe give an example of how the fix will look like - should this be done entirely using sql, or will the java code also change?

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply