Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

BDE "Out of memory" error

1 view
Skip to first unread message

Iassen Hristov

unread,
Sep 3, 1998, 3:00:00 AM9/3/98
to
I have a big problem.

------ ENVIRONMENT ------
I am using Delphi 3.02, Paradox tables and BDE 4.01 under Win NT 4.0
workstation.

I work on a project that consists of several database applications
running simultaneously on the same machine and talking to each other.
The core consist of 3 applications - they must run constantly (24 hours
a day). There are several additional applications that are run from time
to time.

The main application is multi-threaded. It has a TSession component for
every thread and all the TTable components that are used from a
particular thread are referencing that particular (their own) TSession
component. The other applications have just one thread that accesses
databases.


-------- PROBLEM ------

After all the 3 applications are launched and work for a while one will
get an exception saying "Insufficient memory for this operation"
This can happen every place (opening a table, changing the filter of a
table, running an SQL).
Sometimes the problem will be the same and the BDE will report a
different error ("File does not exists" or "Can't open .VAL file" etc.)
The error might even pop in Paradox or Database Desktop. It just depends
when it's going to run out of memory.


--------- CONSECUENSES ------

After this error appears it is not possible to perform the desired
operation, unless you close some BDE application. But this is not
enough. After a while again it will appear the "out of memory". It
clears only when you close all BDE clients.


------- TESTED SOLUTIONS ----------

I've tried absolutely everything that came to mind.

Upgrading the version of the BDE to 4.51 or 5.0 didn't make any
difference. Actually I will experience this problem once in a few
weeks/months from long time ago. Probably since version 3.0 of the BDE,
but now it became so critical that it's stopping me from continuing
doing everything else, till I find a solution to this problem.

Changing the configuration of the BDE with the "BDE administrator"
doesn't help either.


--------- SUSPICIONS ------

I am 90% sure that the problem is not in the code. All the tables and
queryes are open only when needed and then closed.

I just suspect that somewhere along the way the BDE doesn't release
resources. Whether it's a memory leak, or a defragmentation of a big
block of memory and a lack of garbage collection I don't know. The
problem might as well be somewhere in the VCL, which I doubt.


Glatzfamly

unread,
Sep 4, 1998, 3:00:00 AM9/4/98
to
Check in your executable files if there are any *.MB files being created. If
so that could be part of the problem.
********************************
Michael Glatz
glatz...@aol.com
mgl...@briefcase.com

Iassen Hristov

unread,
Sep 4, 1998, 3:00:00 AM9/4/98
to Glatzfamly
What do you mean my executable to create *.MB files?
I don't create tables run-time.
I do have tables that have Memo and BLOB fields, so I have .MB files, but
everything there looks fine and there is no table corruption.

Any ideas on the subject would be greatly appreciated.

Markku Nevalainen

unread,
Sep 4, 1998, 3:00:00 AM9/4/98
to
Just some loose suggestions:

-Have you used any tool to check how your Win free memory and resources
behave when start your three apps, one at a time? And how does the resource
situation look just before fail?
I know, these can be extremely difficult to trace and debug, if they only
appear very randomly, twice a month or so.

-What does the PrivateDir contents (and why not also Netfiledir) look, when
you get the out of memory? Is there some suspicious, big, Query temporary
files in PrivDir?
You also have and keep the PrivDir separated from all the other EXE and
DB-files??

arkku Nevalainen

sparroy

unread,
Sep 4, 1998, 3:00:00 AM9/4/98
to
How do you commit your changes do disk?
Do you use DBISaveChanges and Table.Flushbuffers ?

Iassen Hristov wrote in message <35EED6BE...@idt.net>...


>I have a big problem.
>
>------ ENVIRONMENT ------
>I am using Delphi 3.02, Paradox tables and BDE 4.01 under Win NT 4.0
>workstation.
>

Fred Jansma

unread,
Sep 5, 1998, 3:00:00 AM9/5/98
to
Iassen,

I am afraid I can give you only one solution:

- restart WinNT once in the two weeks.

We had the same problem. WinNT is not always willing to free resources
again. This has nothing to do with your program, but you get the "Out of
memory" error's. Reason: WinNT is really out of memory.

I have not found a good solution yet, but it is something other programs
have to live with as well.

Sincerely,

Fred Jansma.

Conrad Smith

unread,
Sep 7, 1998, 3:00:00 AM9/7/98
to Iassen Hristov
I had the same problem, and struggled for a few weeks until i found the
problem.

In my case it was the cache file size. it just seems to grow and grow,
until your out of memory
so in win95, i've set the max disk cache size to something like 4Mb
and the problem disapeared.

Try to use a system monitor to determine where your memory is directed
to (global heap, disc cache etc.)

cheers

Conrad Smith

Iassen Hristov wrote:
>
> I have a big problem.
>
> ------ ENVIRONMENT ------
> I am using Delphi 3.02, Paradox tables and BDE 4.01 under Win NT 4.0
> workstation.
>
> I work on a project that consists of several database applications
> running simultaneously on the same machine and talking to each other.
> The core consist of 3 applications - they must run constantly (24 hours
> a day). There are several additional applications that are run from time

Iassen Hristov

unread,
Sep 8, 1998, 3:00:00 AM9/8/98
to sparroy
In general all the tables are kept closed. So the table is open, changes
are applied and then the tables is
closed. There is even one situation in which I discovered that sometimes
the changes will not be written to
disk even with Table.FlushBuffer, so I was forced to close the table
after every update and then open it
again.

Iassen Hristov

unread,
Sep 8, 1998, 3:00:00 AM9/8/98
to Fred Jansma
I don't agree that the problem is NT itself.

If I close all BDE application (discard the BDE DLL's) I am starting
fresh and I can work again for 10 minutes until the next "out of
memory". Restarting the computer doesn't make any difference.

Fred Jansma

unread,
Sep 8, 1998, 3:00:00 AM9/8/98
to
Iassen,

In this case: I stand corrected.

In our case, it was the NT machine, on which a lot of work was done.
Somehow, the machine ran out of memory once in the two weeks.

Once in the ten minutes is too fast to blaim NT. Our program is running for
several hours as well, and we don not have the same problem. So conclusion,
you are better off following other peoples replies, maybe their suggestions
give you better hints to work from. Sorry.

Sincerely,

Fred Jansma.


W. Prinzjakowitsch

unread,
Sep 9, 1998, 3:00:00 AM9/9/98
to
One probable cause could be the TQueries. Be sure to .Open them instead of
.Execute. HTH

Iassen Hristov says...

0 new messages