Amazon EC2, mysql bricht den Start ab, weil InnoDB: mmap (x bytes) fehlgeschlagen ist; Errno 12

Ich habe einen eingerichtetMikro Instanzserver auf EC2 basierend auf dem, was ich gelesen habeHier

Mysql-Server fällt häufig aus und zum dritten Mal ist Mysql-Server weg. Die Protokolle werden nur angezeigt

<code>120423 09:13:38 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
120423 09:14:27 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
120423  9:14:27 [Note] Plugin 'FEDERATED' is disabled.
120423  9:14:27 InnoDB: The InnoDB memory heap is disabled
120423  9:14:27 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120423  9:14:27 InnoDB: Compressed tables use zlib 1.2.3
120423  9:14:27 InnoDB: Using Linux native AIO
120423  9:14:27 InnoDB: Initializing buffer pool, size = 512.0M
InnoDB: mmap(549453824 bytes) failed; errno 12
120423  9:14:27 InnoDB: Completed initialization of buffer pool
120423  9:14:27 InnoDB: Fatal error: cannot allocate memory for the buffer pool
120423  9:14:27 [ERROR] Plugin 'InnoDB' init function returned error.
120423  9:14:27 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
120423  9:14:27 [ERROR] Unknown/unsupported storage engine: InnoDB
120423  9:14:27 [ERROR] Aborting
</code>

Was ist wirklichfailed; errno 12? Und wie könnte ich mehr Platz / Speicher geben oder was auch immer benötigt wird, um dies zu beheben.

Ich behebe dies jedes Mal, indem ich das gesamte System neu starte und alle Protokolle lösche und den MySQL-Server neu starte. Aber ich weiß, dass etwas mit meiner Konfiguration nicht stimmt.

Auch meine `my.cnf 'ist wie folgt:

<code>[mysqld]
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under different user or group,
# customize your systemd unit file for mysqld according to the
# instructions in http://fedoraproject.org/wiki/Systemd
# max_allowed_packet=500M
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0


innodb_buffer_pool_size         = 512M


[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
</code>

Antworten auf die Frage(6)

Ihre Antwort auf die Frage