CompiledQueryCache memory leak

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
focsi
Posts: 3
Joined: Fri 08 Jan 2016 07:14

CompiledQueryCache memory leak

Post by focsi » Thu 11 Mar 2021 19:51

Hi,

We develop a windows service. 10 thread run with 1-1 datacontext. This service handles about 25.000 requests per a day. A request runs queries between 10 and 100. It works well for hours, but suddenly the memory usage starts growing by about 100Mb per hours. Problem can reproduced only in productive environments because of requests. A have a JetBrains dotMemory workspace with snapshots. In first 19 hours retined memory of CompiledQueryCache stays under 600 Kbyte. Practically it doesn't change.

I made snapshots in every 60 minutes. After 19 hours the retined memory of CompiledQueryCache started growing drastically (100-200 Mbyte between snapshots).
We have the same problem with earlier devart versions on different environments.

I've read about a workarount, to disable CompiledQueryCache. (not register datacontext). But ignore the cache could be slower.

We use nuget packages with these versions :
Devart.Data v5.0.2333
Devart.Data.Linq v4.9.1878
Devart.Data.Oracle v9.10.909
Devart.Data.Oracle.Linq v4.9.1878

Regards,
Attila Fodor

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: CompiledQueryCache memory leak

Post by Shalex » Mon 15 Mar 2021 11:57

By default, CompiledQueryCache.MaxSize is set to 100. Try descreasing the value, for example, to 10.

Post Reply