in Education by
I have set up a micro instance server on EC2 based MySQL server fails frequently and for the third time, MySQL server is gone. The logs only show 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 What is really failed; errno 12? And how could I give more space/memory or whatever needed to make this fixed. I fix this each time by rebooting the whole system and deleting all logs and restart the MySQL server. But I know something is wrong with my configuration. Also, my `my.cnf' is like below : [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 Select the correct answer from above options

1 Answer

0 votes
by
 
Best answer
A default SWAP space for micro instance is not available. So, you have to set up a swap space for your micro instance to avoid crashes. Micro instances have only 613MB of memory, so MySQL might crash quite often. Setting up a swap space can provide better performance. Follow the below steps to create a swap space for your micro instance. First, create an AWS account and run a Micro instance to start with. Follow these steps to create a swap space for your running micros instance. First, create an AWS account and run a micro instance to begin with. Run dd if=/dev/zero of=/swapfile bs=1M count=1024 Run mkswap /swapfile Run swapon /swapfile Add this line /swapfile swap swap defaults 0 0 to /etc/fstab If you want to automatically enable swap file after every reboot, then you can do the fourth step. Few commands related to SWAP space: $ swapon -s $ free -k $ swapoff -a $ swapon -a

Related questions

0 votes
    I realize a couple of basic differences between the two, i.e. EC2 is going to be cheaper RDS I wouldn't ... just high SELECT volume. Select the correct answer from above options...
asked Feb 2, 2022 in Education by JackTerrance
0 votes
    I'm attempting to copy my MySQL database from an Amazon EC2 to an RDS: I successfully did a mysqldump of ... easy question. Thoughts? Select the correct answer from above options...
asked Feb 4, 2022 in Education by JackTerrance
0 votes
    I want to connect to db on EC2 from my local machine, I am not able to do and have tried everything- I ... to connect to the database Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    Any easy way to move and custom AMI image between regions? (North Virginia -> Singapore) I know you can mess up with ... way to do it? Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    I want to change the time zone set in my Amazon EC2 instance running Ubuntu Linux to local time. My Question ... zone in Amazon EC2? Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    We have a large ec2 instance running in Asia pacific region. We want to reserve that particular instance.In aws ... out on something Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    I have thought a lot recently about the different hosting types that are available out there. We can get ... added probably. Thanks Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    I need to know of any way to access a running instance in Amazon EC2. I DON'T have the original keypair ". ... or assign a new keypair? Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    I need to know of any way to access a running instance in Amazon EC2. I DON'T have the original keypair ". ... or assign a new keypair? Select the correct answer from above options...
asked Feb 5, 2022 in Education by JackTerrance
0 votes
    How should I use the new AWS EC2 classes (r3, i2) with my existing AMI without recreating the whole system ... only PVM AMI images. Select the correct answer from above options...
asked Feb 4, 2022 in Education by JackTerrance
0 votes
    I need SSH access to an Amazon EC2 instance running Ubuntu. All I have is the Amazon username and password. Any ideas? Select the correct answer from above options...
asked Feb 4, 2022 in Education by JackTerrance
0 votes
    I am trying to stop an Amazon EC2 instance and get the warning message Warning: Please note that any data on ... Amazon EC2 instance? Select the correct answer from above options...
asked Feb 2, 2022 in Education by JackTerrance
0 votes
    I'm working to set up Panda on an Amazon EC2 instance. I set up my account and tools last night and had no ... would be a great help! Select the correct answer from above options...
asked Feb 1, 2022 in Education by JackTerrance
0 votes
    I want to use my Amazon ec2 instance but faced the following error: Permission denied (publickey). I have ... denied (publickey) Select the correct answer from above options...
asked Jan 31, 2022 in Education by JackTerrance
0 votes
    I've created a new linux instance on Amazon EC2, and as part of that downloaded the .pem file to allow me ... Nov 11:20 amazonec2.pem Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
...