Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm unable to start mysqld due to it being unable to allocate enough memory.

I've installed the DB using the defaults:

sudo mysql_install_db --user=mysql

Then when I try to start mysqld, I get this:

name@host:/var/lib/mysql$ sudo mysqld --user=mysql
110307 16:01:21 InnoDB: Error: cannot allocate 2097168384 bytes of
InnoDB: memory with malloc! Total allocated memory
InnoDB: by InnoDB 35494096 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...
InnoDB: Fatal error: cannot allocate the memory for the buffer pool
110307 16:02:21 [ERROR] Default storage engine (InnoDB) is not available
110307 16:02:21 [ERROR] Aborting

I haven't been able to find a way to increase ulimits though. The box has enough memory to mysql, so I assume it's just a problem with the mysql user?

I'm using a Xen VM.

share|improve this question
up vote 2 down vote accepted

I would guess from the error message and that since 2097168384 is suspiciously close to 2^31 you are running on a 32-bit system. Try reducing the amount of memory used by InnoDB in my.cnf, particularily innodb_buffer_pool_size, and see if that allows MySQL to start.

See also the warning towards the bottom on the MySQL InnoDB Configuration page about exceeding 2GB.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.