Memory issue

From: Frank Brouwer (frank.brouwer_at_trimergo.nl)
Date: 10/06/03


Date: Mon, 6 Oct 2003 18:47:16 +0200

Hi All,

I have a problem with memory when I use a connection to a database. I have
also posted the question in the database group but as I suspect that it has
to do with garbage collection I also post the question here.

I have a problem with memory using SQLserver on a server running WIN2K
Advanced Server with 2 GB! of internal memory. We limmited the SQLserver
memory to 1 GB and 512 MB for JVM (version 1.4.2_01). The OutOfMemory error
is always at the same place in the jdbc driver as shown below.

java.lang.OutOfMemoryError
 at com.microsoft.util.UtilPagedTempBuffer.compressBlockList(Unknown Source)
 at com.microsoft.util.UtilPagedTempBuffer.getBlock(Unknown Source)
 at com.microsoft.util.UtilPagedTempBuffer.write(Unknown Source)
 at com.microsoft.util.UtilPagedTempBuffer.write(Unknown Source)
 at com.microsoft.util.UtilByteArrayDataProvider.receive(Unknown Source)
 at com.microsoft.util.UtilByteOrderedDataReader.receive(Unknown Source)
 at com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.submitRequest(Unknown
Source)
 at com.microsoft.jdbc.sqlserver.tds.TDSCursorRequest.openCursor(Unknown
Source)
 at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.execute(Unknown
Source)
 at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)
 at com.microsoft.jdbc.base.BaseStatement.executeQueryInternal(Unknown
Source)
 at com.microsoft.jdbc.base.BasePreparedStatement.executeQuery(Unknown
Source)
.............................................. Truncated from here
.................................................

If I run (using same database & JVM) on a computer (W2K prof.) with 512 MB
internal memory and no limmit set for MS-Sqlserver but for JVM 128 MB doing
the same stuff, there is no problem at all.

I suspect it has something to do with a late "kicking in" of the Garbage
Collection causing memory segmentation. So when a big chunk of memory is
required (a large result-set from the database) no contigouis memory block
of memory is availble in the current heap. The JVM claims more memory to
expand the heap, grows and grows until it cosses the limmit. But I also
tought that garbage collection takes care of that too.

I hope some one has seen this behaviour and can point me in the right
direction.

TIA.

Frank.

-- 
Met vriendelijke groet,
Frank Brouwer
_________________________________________________
Trimergo BV
Project Manufacturing Software
Amersfoortseweg 15 C
7313 AB Apeldoorn, Nederland
Telefoon: 055 - 577 7373
Telefax: 055 - 577 7370
www.trimergo.com


Relevant Pages

  • Re: dataset Performence Issue
    ... Microsoft that a DataSet is okay to abuse as a DataBase. ... Managed Code can never be as fast and as optimized ... very good for 90% of the situations i.e. normal memory usage, ... Merge/GetChanges - and oh lets not forget keeping your disconnected cache ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: To Normalize or not ??
    ... The problem is that when you run a split database, ... save a word document (it is in memory, and thus does not get saved). ... ms-access is different then excel or word. ... database server. ...
    (microsoft.public.access.formscoding)
  • Re: Can I Trust Pointer Arithmetic In Re-Allocated Memory?
    ... and leaving the database in an undefined state. ... memory and leave data it arrived unchanged. ... have already allocated with a null pointer. ... SOME people have to clean up in that fashion. ...
    (comp.lang.c)
  • Re: Memory leak in ASP.NET web site
    ... > I have a web app that makes many queries to the database on every page. ... > string to a method and I am passed a datareader or else individual values ... > There is a horrible memory leak in this application. ... > restored until SQL Server and IIS services are restarted. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Memory leak in ASP.NET web site
    ... > I have a web app that makes many queries to the database on every page. ... > string to a method and I am passed a datareader or else individual values ... > There is a horrible memory leak in this application. ... > restored until SQL Server and IIS services are restarted. ...
    (microsoft.public.dotnet.framework.adonet)