AWS - RDS - mysql instances
http://serverfault.com/questions/599421/highest-value-of-max-connections-in-aws-rds-micro-instance
MODEL max_connections innodb_buffer_pool_size
--------- --------------- -----------------------
t1.micro 34 326107136 ( 311M)
m1-small 125 1179648000 ( 1125M, 1.097G)
m1-large 623 5882511360 ( 5610M, 5.479G)
m1-xlarge 1263 11922309120 (11370M, 11.103G)
m2-xlarge 1441 13605273600 (12975M, 12.671G)
m2-2xlarge 2900 27367833600 (26100M, 25.488G)
m2-4xlarge 5816 54892953600 (52350M, 51.123G)
show variables like 'max_connect_errors'
Blocked because of many connection errors
Once this error happens can't access the database from same URL, but can be done from different URL.
Quick Fix
mysqladmin -h ssssss.ffffffff.ap-ffffff-2.rds.amazonaws.com -u root -p flush-hosts
Solution
By default, mysqld blocks a host after 10 connection errors. For more details on the same please refer to http://dev.mysql.com/doc/refman/5.0/en/blocked-host.html.
Can you try increasing the value of max_connect_errors to see if it resolves your issue? You can find more details for the same at http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_max_connect_errors. You can use the CLI for modifying the parameters as documentedathttp://docs.amazonwebservices.com/AmazonRDS/latest/CommandLineReference/CLIReference-cmd-ModifyDBParameterGroup.html
Follow these steps to increase the MySQL limits and avoid locking the database:
- Download the RDS Command Line Toolkit here
- Unzip the toolkit and add the following environment variables
- Add <unzipped_folder>/bin to the PATH variable
- AWS_RDS_HOME=<unzipped_folder>
- AWS_CREDENTIAL_FILE=<unzipped_folder>\credential-file-path.template
- Optionally, override the default region with EC2_REGION=<region> (e.g. us-west-1)
- JAVA_HOME=<JDK location>
- Enter a valid access key into the credental-file-path.template file
- You can get the access key from the AWS console under "Security Credentials"
- In AWS Console, create a "DB Parameter Group" with the database parameters required
- Created one called "mysql-custom"
- Changed max_connect_errors=1000
- Changed max_connections=1000
- Open a command prompt
- Change the parameter group of a database with the command: rds-modify-db-instance finance101test --db-parameter-group-name=mysql-custom --region ap-southeast-2
- Restart(Reboot) the database
- Verify the changes by opening a MySQL command line (i.e. with Navicat) and typing: show variables like 'max_connect_errors';
References
Comments
Post a Comment