MySQL Forums
Forum List  »  Install & Repo

InnoDB failed to allocate memory - 2GB Linux limit?
Posted by: Tom Hartley
Date: September 16, 2004 06:04AM


I have just spent days trying to sort out why I couldn't get InnoDB set up on our big-ish Redhat Linux box and it looks like it may have been something simple.

Our box has 4GB of real ram so for a first pass I had configured 2GB of innodb_buffer_pool_size (ie 50% like it suggests in the manual) plus odds and sods of other bits (50M of innodb_additional_mem_pool_size etc) but when I tried mysqld I got

InnoDB: Fatal error: cannot allocate 2147500032 bytes of
InnoDB: memory with malloc! Total allocated memory
InnoDB: by InnoDB 55939916 bytes. Operating system errno: 12
InnoDB: Cannot continue operation!
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 now intentionally generate a seg fault so that
InnoDB: on Linux we get a stack trace.

I checked ulimit, the kernel build, tried another build from the downloads page - everything. Then someone suggested trying less memory to see how much we could get (which I stupidly hadn't tried because I couldn't understand the ~55Mb total I thought it was implying was all it COULD allocate). I tried 1500M and it worked fine

It occurred to me that what might have happened here is that there just might be an OS limit on malloc'd memory of 2GB in total (hey: it's a 32 bit machine so it ain't gonna get much bigger without a workround) and that what mysqld was telling me was that it had SO FAR got 55Mb but couldn't get ANOTHER two gigabytes. Dropping down to keep the whole lot under 2GB seemed to do the trick

I'm posting this in the hope that other people who get this problem and are about to spend two days sorting it will find this post first and save themselves the angst


Options: ReplyQuote

Written By
InnoDB failed to allocate memory - 2GB Linux limit?
September 16, 2004 06:04AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.