Aerospike data expire

Hi,all Recently,I met the problem after writing data to aerospike with expiration=86400*3 ,but a few hours later,the data decreased.There are 4 nodes in the cluster but somehow 3 nodes use disk and memory store while the last one store only in memory,does it matters?

Thanks ,

You’re not really giving that much information here.

  1. Did you restart these nodes, or the server on them (asd)?
  2. How are you setting that TTL? Which language client?
  3. Once you create a record, do you ever update it? If you do, does that update have a TTL?
  4. What is the default TTL of the namespace?

Quoting the configuration here, and adding a code snippet from the client would help.

And no, you shouldn’t have namespace definition that doesn’t agree like that, but mostly for operational and performance reasons. Do a diff on the config files to see if they’re the same.

Let’s just say this is not normal behavior. You probably want to look in the logs for things marked ‘warning’ and ‘error’.

Thanks sir.May be I find the answer.Watching the UsedMem,all the nodes exceed the upper limit of hwm mem.It that evicting data makes data loss?

There’s a good knowledge base article in the community forum, FAQ What are Expiration, Eviction and Stop-Writes?

Evictions start when you breach the high watermark for memory or disk. You will see a warning in your log that hwm_breached has happened. The operations manual discusses the key metrics you should be monitoring, and this is one of them.


i have the same problem and i dont know how to fix it.

I use the default config after install:

namespace test {
	replication-factor 2
	memory-size 4G
	default-ttl 30d # 30 days, use 0 to never expire/evict.
	storage-engine memory

there are 256.408 objects saved (24% memory usage), some minutes later there are only 133.294 objects (13% memory usage). 13,229 objects expired (seems to be correct) 0 objects evicted

What happend with my data?

My statistics:

1 :  node
2 :  statistics
3 :  features
4 :  cluster-generation
5 :  partition-generation
6 :  build_time
     Wed Feb 15 21:57:43 UTC 2017
7 :  edition
     Aerospike Community Edition
8 :  version
     Aerospike Community Edition build
9 :  build
10 :  services

11 :  services-alumni

12 :  build_os

1 - How are you inserting the objects? Are you modifying the default TTL when you are inserting objects? With 30d default ttl, you should not be expiring objects - assuming you dropped from 256K to 133K fairly quickly. What is the size of your objects?

2 - can you $grep thr_nsup /var/log/aerospike/aerospike.log and post output? 3 - can you post output of $asinfo -v "namespace/test"

Hi, thx for your help. I found the issue in my code. Aerospike is working fine.

@dercoder was the observed issue with your code overwriting the default-ttl to a lower value?

@pgupta Hi is there any restriction for client ttl over default-ttl of namespace. for an example ,can we set ttl while writing record to higher then default-ttl of namespace.

Co-posted here: overwriting default-ttl of Aerospike namespace - Stack Overflow - I replied there.