Difficulty expiring documents quicker than once an hour.

I'm having difficulty setting exp_pager_stime. I've run the following command for each node in the cluster:

/opt/couchbase/bin/cbepctl <host:port> set flush_param exp_pager_stime 60

which returns:

setting param: exp_pager_stime 60
set exp_pager_stime to 60

However, all expired items are only being removed once an hour. I do see a few items removed every minute, but not all. When I change exp_pager_stime to 120, I start to see the handful of removals occurring every two minutes. So it appears the change is doing something, but the process that runs every 60 or 120 seconds doesn't fully remove the expired items. However, I do see a full removal happen every hour at the same time.

I have confirmed that ep_num_expiry_pager_runs (reported from cbstats) increments every minute or 2 minutes based on my configuration, so it does seem that it's running, just not having a real effect.

When I use cbstats to query the current exp_pager_stime I get very curious results.

$ /opt/couchbase/bin/cbepctl <host:port> set flush_param exp_pager_stime 60;
setting param: exp_pager_stime 60
set exp_pager_stime to 60
$ /opt/couchbase/bin/cbstats <host:port> all | grep exp_pager_stime;
ep_exp_pager_stime: 28920
$ /opt/couchbase/bin/cbstats <host:port> config | grep exp_pager_stime;
ep_exp_pager_stime: 14460

$ /opt/couchbase/bin/cbepctl <host:port> set flush_param exp_pager_stime 60;
setting param: exp_pager_stime 3600
set exp_pager_stime to 3600
$ /opt/couchbase/bin/cbstats <host:port> all | grep exp_pager_stime;
ep_exp_pager_stime: 36000
$ /opt/couchbase/bin/cbstats <host:port> config | grep exp_pager_stime;
ep_exp_pager_stime: 18000

I don't see how my setting relates to the number reported by cbstats.

Can anyone explain what's going on?

1 Answer

« Back to question.

I discovered why this is happening for me, maybe it will help someone else.

The data bucket in question uses a dedicated port (auth-less). When executing my cbepctl commands, I specified the cluster using <hostname>:<dedicated port>.

This was resulting in the strange values I wrote about (as well as not having the intended change in exp_pager_stime).

I was able to get the values properly set by using:

<hostname>:11210 -b <bucket_name> -p ""

When change the parameter this way, the correct value gets set.