------ 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.
Any ideas on the subject would be greatly appreciated.
-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
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.
>
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.
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
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.
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.
Iassen Hristov says...