Skip navigation links
/ / Up / Table of Contents

User Comments

Posted by Peter Beckman on August 23 2005 1:41pm[Delete] [Edit]

On FreeBSD 5.x, there is a hard limit default compiled into the kernel which limits the amount of memory a process can use to 512MB. You can see this by running the command "limits."

You can, without recompiling the kernel, increase this per process memory limit to something higher, but absolutely below your physical memory. I.e. if you have 1GB of memory, do not set your per process memory limit equal to or higher than that! FreeBSD 5.x will crash and not be able to be recovered without a local change being made if you set that limit higher than the amount of physical memory . (FreeBSD Bug:

In /boot/loader.conf, add these lines (on a 1.5GB box or greater):
kern.maxdsiz="1073741824" # 1GB
kern.dfldsiz="1073741824" # 1GB
kern.maxssiz="134217728" # 128MB

Then reboot, and increase your my.cnf memory configuration values in order to increase mysql memory usage.

The error you might see (related here since the Operating system error number is 12 (ENOMEM) Out of memory:

InnoDB: Error: cannot allocate 797284 bytes of
InnoDB: memory with malloc! Total allocated memory
InnoDB: by InnoDB 6299504 bytes. Operating system errno: 12
InnoDB: Check if you should increase the swap file or
InnoDB: ulimits of your operating system.
InnoDB: On FreeBSD check you have compiled the OS with
InnoDB: a big enough maximum process size.
InnoDB: We keep retrying the allocation for 60 seconds...
InnoDB: Fatal error: cannot allocate the memory for the buffer pool

Top / / / Up / Table of Contents