[py-lmdb] Re: MapFullError - MDB_MAP_FULL

  • From: David Wilson <dw@xxxxxxxx>
  • To: py-lmdb@xxxxxxxxxxxxx
  • Date: Fri, 23 May 2014 16:04:53 +0000

On Fri, May 23, 2014 at 08:52:19AM -0700, Dinesh Vadhia wrote:

> Got a mdb_map_full error twice on a 64-bit Python 2.7 environment with a
> map_size=2gb.  Using the guidance of 8+key+value, the populating data should
> have comfortably fitted around 1.7gb.  Best solution is to increase the
> map_size but wondered if I'm missing something?

Unless you are on OS X or using a filesystem that does not support
sparse files (which is unlikely on Linux), you're best just setting
map_size to a huge value, say, 2TB, and forgetting about it.

The disk space is not actually allocated until it is written to, so your
output DB will always be smaller than the map_size in this case.


Other related posts: