SERVER CRASH - Unnecessary use of Swap in Couchbase 2.2.0 version , Even when memory is available

Hello Team,
Unnecessary use of Swap , even my memory is available.
Swap is going to 100%

I have assign 4 GB Swap on Each node.
Node is 60 GB , 35 GB in Used … Then y Its using Swap.

My Server is crashing with Below error in /var/log/messages

Jul 21 09:59:06 ip-10-231-53-110 kernel: Out of memory: Kill process 9547 (memcached) score 824 or sacrifice child
Jul 21 09:59:06 ip-10-231-53-110 kernel: Killed process 9547, UID 497, (memcached) total-vm:56355684kB, anon-rss:51113544kB, file-rss:2076kB
Jul 21 10:00:20 ip-10-231-53-110 ntpd_intres[1350]: host name not found: time


Whats your swappiness value?
#sysctl vm.swappiness

Whats your node config: memory of machine?

Whats how much memory is used by Couchbase data?

Do you have views? if so how many?

Are you running anything else on nodes besides CB?

Hi ,

I am not sure whether this is resolved or not. We are having similar issue. we have 7 nodes in cluster . Memory sized 500G each. Swap size is 4G each. RAM usage does not cross 75% , but swap is observed on few nodes. when checked with process which is causing swap its memcached.

What is the resolution as application is performing slow when swap usage is 100%

Hi @rag

I’m facing the same issue. I have 3 nodes, swappiness sets to 0 on each, and I can see a swap usage on 2 nodes (beam.smp and memcached processes) even if the RAM usage is still ok.

The only difference between the 1st node with no swap and the 2 others is the 1st node is running debian 9 and the 2 others debian 10.

Did you find a solution ?