prevent OOME on millions of keys