InfoHeap
Tech tutorials, tips, tools and more
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
  • 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 install wordpress on Amazon AWS-EC2 Classic Ubuntu Linux micro instance
  2. How to allow mysql access on AWS/EC2 from a specific IP
  3. How to upgrade EC2 Ubuntu Linux micro instance to small
  4. How to check the performance of a plugin using mysql query log
  5. How to create Linux instance on Amazon AWS/EC2 Classic
  6. Ubuntu – check if a service is upstart based
  7. How to find mysql query rate on Linux
  8. Mysql – how to enable query log
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Tutorials | Tagged AWS and EC2, Linux, Mysql, Tutorials

Follow InfoHeap

facebook
twitter
googleplus
  • Browse site
  • Article Topics
  • Article archives
  • Recent Articles
  • Contact Us
  • Omoney
Popular Topics: AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | 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

Copyright © 2021 InfoHeap.

Powered by WordPress