avniproject / avni-server

Backend APIs for Avni
https://avniproject.org
GNU Affero General Public License v3.0
7 stars 25 forks source link

Reduce AddressLevelCache footprint in Avni-server #794

Open mahalakshme opened 3 days ago

mahalakshme commented 3 days ago

Need:

Since the SyncDetails performance might get reduced with the below quick change suggested, for organisations with more addresses, and hence good to pickup this earlier.

Issue

Avni server becomes nonresponsive after 4-5 days due to repeated Full-GC using up almost all the CPU time, trying to bring down heap memory from near the limit of 5gb, in production env.

Current issue

This results in us having to periodically encounter non-responsive app and later a forced restart of the server, which seems like a broken behaviour.

Quick change to reduce impact

Analysis details

AC

Reduce AddressLevelCache footprint in Avni-server, so that overall app memory footprint remains within configured limits.

There are following avenues for improvement that we could check out:

mahalakshme commented 3 days ago

commit done for this: https://github.com/avniproject/avni-infra/commit/192860f5c9bb860a76ded60725463487bc39eb40