InfoHeap
Tech
Navigation
  • Home
  • Tutorials
    • CSS tutorials & examples
    • CSS properties
    • Javascript cookbook
    • Linux/Unix Command Line
    • Mac
    • PHP
      • PHP functions online
      • PHP regex
    • WordPress
  • Online Tools
    • Text utilities
    • Online Lint Tools
search

AWS and EC2

  • AWS benefits
  • Broken sudoers file
  • EBS and reliability/durability
  • EC2 api tools on Ubuntu
  • How to extend disk (EBS) size on Amazon Linux
  • Install wordpress AWS Classic Ubuntu
  • Linux instance on AWS Classic
  • Mysql access
  • Mysql service and micro instance
  • Route53 as DNS
  • Upgrade Linux micro instance to small
  • ssh automation
 
  • Home
  • > Tutorials
  • > AWS and EC2

How to fix mysql service stopping intermittently on AWS micro instance

By admin | Last updated on Mar 15, 2016

I was having this problem since last few days. My mysql server was getting killed on its own on aws/ec2 micro instance. So far I was restarting the whole instance to fix this problem.

When I looked at the log (/var/log/mysqld.log) on my centos linux instance, here is what I saw:

130304 23:55:47 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
130304 23:55:47 InnoDB: Completed initialization of buffer pool
130304 23:55:47 InnoDB: Fatal error: cannot allocate memory for the buffer pool
130304 23:55:47 [ERROR] Plugin 'InnoDB' init function returned error.
130304 23:55:47 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

After reducing innodb_buffer_pool_size (default 256M) to 10M in /etc/my.cnf the problem seems to have gone away. Here is the value I changed in /etc/my.cnf (On Ubuntu the location is /etc/mysql/my.cnf)

[mysqld]
innodb_buffer_pool_size = 10M

This worked on both CentOS and Ubuntu Linux. I took a very low value for now as I don’t have too much data and traffic. I’ll watch and see if this needs to be increased in next few days.

Suggested posts:

  1. How to set up google analytics profiles for domain and sub-domain tracking
  2. Ubuntu – dpkg and apt-get beginner tutorial
  3. Ubuntu – how to find boot autostart status of a service
  4. How to find mysql query rate on Linux
  5. WordPress themes for beginners worth considering
  6. How to capture php code or included file output in a variable
  7. mysql find recently created-tables
  8. Top 5 Free Screen Recorder Software For Windows 10
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Tutorials | Tagged AWS and EC2, Linux, Mysql, Tutorials
  • Browse content
  • Article Topics
  • Article archives
  • Contact Us
Popular Topics: Android Development | AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | Company results | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | Kubernetes | Linux | Linux/Unix Command Line | Mac | Mac Command Line | Mysql | Networking | Node.js | Online Tools | PHP | PHP cookbook | PHP Regex | Python | Python array | Python cookbook | SEO | Site Performance | SSH | Ubuntu Linux | Web Development | Webmaster | Wordpress | Wordpress customization | Wordpress How To | Wordpress Mysql Queries | InfoHeap Money

Copyright © 2025 InfoHeap.

Powered by WordPress