Massive memory consumptuion

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
tim.haegele
Posts: 2
Joined: Wed 21 Mar 2007 08:40

Massive memory consumptuion

Post by tim.haegele » Wed 21 Mar 2007 10:12

Hi there,

we are developing a product information system. We are using ODAC Version 5.8.0 to connect to Oracle. We are using ADO to connect to MSSQL.

We have a problem with massive memory consumption when connecting to Oracle. A process working with ADO and MSSQL crashes doing the same with ODAC and Oracle.

A lot of query objects are created (>> 100000). But all are released again. Our process reserves much more memory than it acutally needs. We tested it with Oracle Server 10.1.0.2 and Client 10.2.0.1.

We are using the following settings:

TOraQuery:
TOraQuery.UniDirectional := true;
TOraQuery.Options.AutoPrepare := false;
TOraQuery.Options.KeepPrepared := false;
TOraQuery.Options.AutoClose := true;
TOraQuery.Options.CacheLobs := false;
TOraQuery.Options.ScrollableCursor := false;

TOraSession:
TOraSession.Options.UseUnicode := true;

Can anybody help us? Thanks in advance.

Kind regards
Tim

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Wed 21 Mar 2007 16:30

Please specify whether more than 100000 TOraQuery objects exist in your program at the same time, or a new TOraQuery object is created after objects used before are freed. Also specify memory size used by process working with ODAC, and count of TOraQuery objects that exist at this time.

tim.haegele
Posts: 2
Joined: Wed 21 Mar 2007 08:40

Post by tim.haegele » Thu 22 Mar 2007 10:59

If we use our query cache only 30-40 query objects exist at the same time (they are not open at the same time). If we do not use the query cache max 2-3 queries exist at the same time. Query objects are released and ininitialized when needed.

We did another test where only 31 query objects were created at all. After using a query it is closed and afterwards used again. The same problem occurs.

The application reserves 1.4 GB of memory when it crashes with an EOutOfMemory error (Windows task manager). But our memory log shows us it allocates only 13 MB of memory.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Fri 23 Mar 2007 08:40

We could not reproduce the problem. Please send to odac*crlab*com a complete small sample that demonstrates the problem, including script to create server objects.

justin
Posts: 1
Joined: Tue 03 Apr 2007 07:45
Location: Shanghai

Post by justin » Tue 03 Apr 2007 10:09

I just want to add that I have the same problem. I am new to the corelabs components and I am hoping to convert all my old ADO components over to ODAC. However when I do a query that normally would return 30000 records I get an out of memory error. This is after a long period of time. The memory usage is in excess of gigabyte.

I believe the problem is related to a CLOB field that is returned. The amount of data in this field in more than about 300 bytes in this case. Oracle ADO didn't have any problem with it.

I am using:

Oracle: 10.2.0.1
OCI: 10.2.0.1
ODAC: 6.00.0.4
Compiler: Delphi 7

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Tue 03 Apr 2007 12:27

Please send us the script to create your table. If it is possible send as a dump with the data or specify the structure and sizes (for CLOB fields) of your data.

Post Reply