I have a single node Aerospike running on Docker. I do write once at startup and afterwards I do only read operation using Golang Aerospike client.
The Aerospike keeps consuming memory and crashes after a while when there is no memory available (OOM).
Following is my aerospike.conf
-
service {
user root
group root
paxos-single-replica-limit 1 # Number of nodes where the replica count is automatically reduced to 1.
pidfile /var/run/aerospike/asd.pid
service-threads 4
transaction-queues 4
transaction-threads-per-queue 4
proto-fd-max 15000
}
logging {
file /var/log/aerospike/aerospike.log {
context any warning
}
console {
context any warning
}
}
network {
service {
address eth0
port 3000
}
heartbeat {
address eth0
mode mesh
port 3002
interval 150
timeout 10
}
fabric {
address eth0
port 3001
}
info {
port 3003
}
}
namespace my_namespace {
replication-factor 1
memory-size 1G
default-ttl 5d # 5 days, use 0 to never expire/evict.
# storage-engine memory
storage-engine device {
file /opt/aerospike/data/my_namespace.dat
filesize 5G
write-block-size 128K
data-in-memory true
}
}
The RAM usage on Aerospike Console shows negligible usage. But on htop
I can see that it keeps on increasing.
Aerospike Console-
htop-
I read the following discussion but couldn’t find a solution- High memory usage on Kubernetes GKE using helm chart
Update-
I used direct-files
as follows
storage-engine device {
file /opt/aerospike/data/my_namespace.dat
filesize 5G
write-block-size 128K
data-in-memory true
direct-files true
}
but still the problem persists.