Print Thread
Page 1 of 2 1 2
"Out of Memory" after many SELECTS
#7688 08/09/05 08:25 PM
Joined: May 2005
Posts: 22
B
Member
OP Offline
Member
B
Joined: May 2005
Posts: 22
In our application I get a "Out of memory"-Exception in the TRecordDataList.AllocateBlock-Methode when calling GetMem.

This problems doesn't appear when replacing the default-memorymanager with FastMM (http://sourceforge.net/projects/fastmm/).

The problem is also invisible when doing the same work with one of our other supported databases (Our application support 4 DBM's).

So it seems that the default-Delphi-Memory-Manager gets a fragmentation-problem with DOA. The memory-consumption when checking it in Windows-Taskmanager show that the application have only 350 MB of Memory allocated.

Are there any known issues for this problem?

Re: "Out of Memory" after many SELECTS
#7689 08/09/05 09:58 PM
Joined: Aug 1999
Posts: 22,216
Member
Offline
Member
Joined: Aug 1999
Posts: 22,216
How large are these result sets? Note that for some dataset functionality it may be appropriate to set UniDirectional to True to prevent memory overhead.


Marco Kalter
Allround Automations
Re: "Out of Memory" after many SELECTS
#7690 08/10/05 11:48 AM
Joined: May 2005
Posts: 22
B
Member
OP Offline
Member
B
Joined: May 2005
Posts: 22
Normaly only 1 Record. In some cases up to a few hunderts.

Re: "Out of Memory" after many SELECTS
#7691 08/23/05 06:41 PM
Joined: Jun 2002
Posts: 17
Dublin, Ireland
D
Member
Offline
Member
D
Joined: Jun 2002
Posts: 17
Dublin, Ireland
Is there any update on this issue ?
I have a similar problem in a three-tier app. In my case it occurs on opening client datasets. The problem is not isolated to any particular one and the datasets in question can have been previously opened many many times. Also, the problem does not occur with a BDE server layer, only with DOA components.

Re: "Out of Memory" after many SELECTS
#7692 08/23/05 07:14 PM
Joined: Aug 1999
Posts: 22,216
Member
Offline
Member
Joined: Aug 1999
Posts: 22,216
Beyond the UniDirectional tip, I have no other tips. You can use this in a server application as well if TDataSetProvider.ResolveToDataSet = False.


Marco Kalter
Allround Automations
Re: "Out of Memory" after many SELECTS
#7693 08/25/05 03:59 AM
Joined: Jun 2002
Posts: 17
Dublin, Ireland
D
Member
Offline
Member
D
Joined: Jun 2002
Posts: 17
Dublin, Ireland
Yeah - I tried the Unidirectional but it didn't do any good. I wrote a multi-threaded stress test program to constantly open and close a set of datasets - which is TOracleDataSet and TOracleProvider pairs in a multi-threaded server application. This essentially mimics multiple client PCs running against the server layer. Eventually I managed to get Delphi to break while running the server program through the IDE. It failed with an exception somewhere within the TOracleDataSet.InternalInitFieldDefs. I haven't managed to tie it down further than that, as it takes hours, or even days to get it even this far. Does this lead you to think in any specific direction ? This is Delphi 4 by the way, and DOA 4.0.6. This is a production environment, so its a particularly serious problem for my business. Any help or suggestions your have would be gratefully received. Thanks.

Re: "Out of Memory" after many SELECTS
#7694 08/25/05 04:17 AM
Joined: Jun 2002
Posts: 17
Dublin, Ireland
D
Member
Offline
Member
D
Joined: Jun 2002
Posts: 17
Dublin, Ireland
Actually, as an addition to the last post, an "out of memory" also occurs in the GetMem call of the OracleData unit TRecordDataList.AllocateBlock.

Re: "Out of Memory" after many SELECTS
#7695 08/25/05 07:29 PM
Joined: Aug 1999
Posts: 22,216
Member
Offline
Member
Joined: Aug 1999
Posts: 22,216
[quote]Yeah - I tried the Unidirectional but it didn't do any good.[/quote]Why not?


Marco Kalter
Allround Automations
Re: "Out of Memory" after many SELECTS
#7696 08/25/05 09:50 PM
Joined: Jun 2002
Posts: 17
Dublin, Ireland
D
Member
Offline
Member
D
Joined: Jun 2002
Posts: 17
Dublin, Ireland
In other words, I get the errors with or without it. So setting Unidirectional had no effect.

Re: "Out of Memory" after many SELECTS
#7697 08/26/05 06:40 PM
Joined: Aug 1999
Posts: 22,216
Member
Offline
Member
Joined: Aug 1999
Posts: 22,216
That's odd, because with UniDirectional there is no memory overhead. Perhaps there are some other memory consuming functions occurring?


Marco Kalter
Allround Automations
Page 1 of 2 1 2

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.030s Queries: 14 (0.008s) Memory: 2.5598 MB (Peak: 3.0421 MB) Data Comp: Off Server Time: 2024-05-11 16:05:35 UTC
Valid HTML 5 and Valid CSS