Hi,
I have developed a REST service with EntityDAC / UniDAC on Oracle. Since the services are backend to backend I have disabled the cache to be able to control and manage the memory.
I create and destroy the context at each use and the Context has the option Options.Cache.Enable: = False
Despite this, the memory continues to grow. Faced with the destruction of the contex, the memory is not freed. This is a big problem because after a few weeks I am forced to restart the service!
I have also activated the verification of memory leaks and there are none. When the application is closed, everything is closed correctly
I have reported other issues for the past 5 months and have not yet received an answer. At this point if I can't solve this memory problem I'm forced to throw away the project and do it again!
Memory Management
-
- Posts: 48
- Joined: Mon 30 Apr 2007 07:36
Re: Memory Management
This is a very sample code only for test:
I execute many times this sample procedure, The initial memory allocated is 16 Mb. After running the code a few times the memory allocated is 60 Mb. As you can see in the code each loop destroys the context and recreates it this does not free the allocated memory
In this video you can see what happens:
https://drive.google.com/file/d/1VGbOQP ... sp=sharing
Could you give me feedback quite urgently
Code: Select all
var
LContext: TRISDataContext;
LOrdersExpression: IVOrdersReportExpression;
LQuery: ILinqQueryable;
LOrders: IObjectEnumerable< TVOrdersReport >;
LStudiesExpression: IVAccessionNumberStudyExpression;
LStudies: IObjectEnumerable< TVAccessionNumberStudy >;
begin
for var LIndex: Integer := 0 to 1000 do
begin
LContext := TRISDataContext.Create(nil);
LContext.Options.Cache.Enabled := False;
LContext.Connection := EntityConnection1;
try
LOrdersExpression := LContext.VOrdersReport;
LQuery := Linq.From(LOrdersExpression)
.Where(LOrdersExpression.PkReport = 20178662)
.Select();
LOrders := LContext.GetEntities< TVOrdersReport >(LQuery);
LStudiesExpression := LContext.VAccessionNumberStudy;
LQuery := Linq.From(LStudiesExpression)
.Where(LStudiesExpression.AccessionNumber = '30150343')
.Select();
LStudies := LContext.GetEntities< TVAccessionNumberStudy >(LQuery);
TThread.Sleep(10);
finally
LContext.Free;
end;
end;
In this video you can see what happens:
https://drive.google.com/file/d/1VGbOQP ... sp=sharing
Could you give me feedback quite urgently
-
- Posts: 48
- Joined: Mon 30 Apr 2007 07:36
Re: Memory Management
Hi,
no answer yet?
I need to URGENTsolutions for this problem. Why does the memory keep growing? Is there anything I need to do to avoid this? There are no memory leaks but the memory continues to grow!
Thank you
no answer yet?
I need to URGENTsolutions for this problem. Why does the memory keep growing? Is there anything I need to do to avoid this? There are no memory leaks but the memory continues to grow!
Thank you
-
- Posts: 48
- Joined: Mon 30 Apr 2007 07:36
Re: Memory Management
Hi
sorry, after some other test, I found this memory leaks
https://drive.google.com/file/d/172gpth ... sp=sharing
i need a solution! This memory leak is giving me a lot of problems.
Another (little) problem is an access violation in this method:
function TUnmappedMetaTypeList.Find(const MetaAttributeDescs: TMetaAttributeDescs): TUnmappedMetaType;
unit EntityDAC.MetaData;
sorry, after some other test, I found this memory leaks
https://drive.google.com/file/d/172gpth ... sp=sharing
i need a solution! This memory leak is giving me a lot of problems.
Another (little) problem is an access violation in this method:
function TUnmappedMetaTypeList.Find(const MetaAttributeDescs: TMetaAttributeDescs): TUnmappedMetaType;
unit EntityDAC.MetaData;
Re: Memory Management
Thank you for the information. We will investigate the described issue and let you know the results shortly.