origam.com

Server Instance Memory Consumption

The server instance consumed around 3.5GB after two weeks of running. This seems to be rather high and the client asks for the analysis of the memory dump.

Memory dump was handed over to @jsusen.

Total space alocated ~ 3 GB, actualy used ~ 1.5 GB.

The most space take objects of type FormSession (800 MB)


There is 88 of them and the biggest has 80 MB. Pretty much all of the 80 MB is DataSets

I don’t see any obvious problem. May be @tvavrda could comment on this

88 form sessions. Is that real? That means 88 opened screens by the users.

This seems to be inline with application usage. I’d say it is correct value.

We currently cache SQL adapters (adapters, parameters, sql expressions) for each user forever. If we would introduce some cache expiration we might save a few hundreds of megabytes in this case. This would be especially important if we would have e.g. thousands of users (lots of caches) who would log in only once a month. If the ratio is opposite (a few users using the app every day) it would not save anything.

Expiration of unused user sessions would also help. Again – if there are occasional users who do not properly log out of the application – they occupy the memory forever.

@tvavrda So I guess we should create a new issue, something like “Implement Cahe Clearing”. Or is this problem not that important?

It hasn’t been but it would certainly help to have this.

But it must be highly configurable. Timewise, dirty screens should have a different timeout than non-dirty. The expiration time should count from when the screen was touched the last time but also when the user was online - so tabs are not expiring mid-work.