1. Aleksandar Spasojevic
  2. Valentina Server
  3. Saturday, February 22 2020, 11:06 AM
  4.  Subscribe via email
Hello Everyone,

DB Server very often takes almost all of RAM, 32 GB. Sometimes, problem is solved by emptying memory with "RamMap". But, there are also situations where even "RamMap" cannot empty memory and only solution is to restart VServer. Problem with high RAM usage is happening once in a day.
Does VServer do some kind of smart memory allocation?
Can it create new problems if I let it be with all memory?
Could this be memory leak in my application, or server is simply using all available memory?

Thank you
Comment
There are no comments made yet.
Ruslan Zasukhin Accepted Answer
Hi Aleksandar,

Valentina DB engine uses

1) fixed size cache you choose

2) during SQL queries it can produce RAM objects: bitsets, arraysets, ram tables, trees, etc.
some of them deleted after the query is done,
some of them become RESULT - which you get in hands -- result table. OR cursor

3) when you finish work with cursor - it should free underline result table.

4) when a connection to vserver closes -- all used RAM for this connection and its cursors must be free by vserver.


So, in general, the answer is: vserver should not eat all the available RAM. With time, you should see jumping RAM usage.

This cannot be a memory leak in your app, because your app is not on the server-side, yes?
But your app can keep connections - and provide a side-effect of how many RAM uses vserver for that not closed connections.

Please try to keep an eye, how grow RAM of vserver - e.g. slowly up? other ways?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Server
  3. # 1
Hello Ruslan,

It is not server-side app.
From last check when I was monitoring RAM, it was jumping for 1-3 MB with any cursor which wasn't deleted (Cursor not deleted - deleting cursor...)
Killing all connections to VServer is not making RAM go back to normal.

If I initialize VServer with 500MB of cache, it is using that memory only for that client, right? So, if I have 30 active connections, it shouldn't exceed 15GB of RAM?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Server
  3. # 2
Ivan Smahin Accepted Answer
No, 500MB of cache is for all clients.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Server
  3. # 3
Hello Ivan,

I assume that's for VServer cache. I meant for Valentina.InitClient(500*1024*1024) in client applications.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Server
  3. # 4
Ruslan Zasukhin Accepted Answer
Btw, I think I see the first time such a huge cache size.

does it really help you?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Server
  3. # 5
Ruslan Zasukhin Accepted Answer
Valentina.InitClient(500*1024*1024). -- this is cache on client-side computer ...
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Server
  3. # 6
Ruslan Zasukhin Accepted Answer
/// Killing all connections to VServer is not making RAM go back to normal.

Then maybe you can give us some CLIENT SIDE your app,
and steps. ... we connect to vserver .. and see grow of ram ...

We need way to reproduce ...

OR maybe you can reproduce this in small 10 lines code xojo example app?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Server
  3. # 7
Hello,

I cannot isolate one part of the apps because I cannot find which part is mostly affecting RAM. There is many applications which are communicating with DB server.
Would it help if we give you access to system while memory is raising?
I tried multiple basic examples, but still no way to reproduce it that simpy.

Please, recommend if you have any idea which would be helpful.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Server
  3. # 8
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.