PostgreSQL taking a lot of RAM Memory

Viewed 12

Hi !

Yesterday my VPS got stuck and found out that was postgress which were taking 21% of the RAM, 2Gb. I restarted it and went to 0,5%, now 12H later it is 1% and will increase.
I have only 10 GW and 150 devices and 4 tenants, why it takes so much ?
Thanks for the help, we start the production soon after 2 years of pilot.
Cheers and have a nice day dear community.

Joseph

1 Answers

I believe this is a PostgreSQL question, and is not a ChirpStack bug. In general, PostgreSQL will try to cache as much as it can in memory for performance reasons. Also, it could be related to (idle) connections. Each connection to PostgreSQL will consume some memory and depending on the pool-size configured in ChirpStack, this might or might not be significant.

A quick search gave me this Reddit discussion:
https://www.reddit.com/r/PostgreSQL/comments/1d0cjv3/need_help_diagnosing_high_memory_usage/

Maybe it could be helpful to debug this further.