[Welcome] [TitleIndex] [WordIndex

Problem

Importing or manipulating large data sets (many millions of objects at once) may result in a Python "MemoryError" exception being raised!!.

Solution

By default in FreeBSD 5.X or 4.X the kernel will limit the amount of RAM any one process can use to 512MB (older versions of FreeBSD this was lower).

You can tweak this in /boot/loader.conf by setting these values:

  kern.maxdsiz="1610612736"
  kern.dfldsiz="1610612736"
  kern.maxssiz="1610612736"

Reboot for the new values to take effect.

This will allow the process to use more physical RAM, but be careful because putting this number too close to the actual amount of physical RAM might cause the box to not boot.

Hat tip to the Plone folks

Discussion


CategoryCookbook


2010-09-22 22:14