My curent config works great but my innodb_buffer_pool_size is too small as the database is very large.

All I am changing in my MySQL.cnf is

innodb_buffer_pool_size = 1G


innodb_buffer_pool_size = 2G

I then try and restart MySQL and it errors with the following..

110715  8:44:48  InnoDB: Error: cannot allocate 2147500032 bytes of
InnoDB: memory with malloc! Total allocated memory
InnoDB: by InnoDB 25166072 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: Note that in most 32-bit computers the process
InnoDB: memory space is limited to 2 GB or 4 GB.
InnoDB: We keep retrying the allocation for 60 seconds...

This is a 4GB x86 machine dedicated to MySQL!

  • And the operating system is? And is it 32 or 64 bit installation? Jul 15, 2011 at 9:54

2 Answers 2


I'm going with x86_32 (given the error message), and hence you're out of luck -- even with PAE, the maximum process size is still limited by the 4GB address space. Get yourself a 64-bit system and be done with it.

  • Thanks I probably will do, strange as I have other x86_32 systems able to set that to 2G Jul 15, 2011 at 10:50
  • Sure, if your other settings (and usage patterns) are such that the process uses less than 3GB of memory, you'll be fine. Dangerous to be running that close to the limit, though. That brings another thought to mind -- is this system running a 2G/2G split kernel, instead of a 3G/1G on the rest of them?
    – womble
    Jul 15, 2011 at 11:05
  • No exactly the same build, will go x64 I think as this is a large DB! Jul 15, 2011 at 14:50
  • Note "and usage patterns".
    – womble
    Jul 15, 2011 at 22:20

I had the same problem with 32 bit version of MySQL on a windows server 2008 VM 64 bit with 4G Ram. I tried increasing system ram to 6G and still could not allocate over 1G for innoDB.

Since I was already on 64 bit OS, I tried the 64 bit installer for MySQL and had no issues at all allocating 2G on my 4G system.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .