I am getting the error: \"error establishing a database connection\" after moving my wordpress blog to Amazon EC2. I\'ve checked the wp-config.php file and settings are ok (loca
you might consider closing your ports.
In AWS you can do this in the Security Group. For example if you have SSH, HTTP and HTTPS ports open (22, 80 etc..) try closing them to only your IP address. (by default they are 0.0.0.0, open to everyone). You should especially do this for SSH port.
bots are always trying to gain access to open ports... hitting you thousands of times a day if not more to test if you have open vulnerabilities. Depending on the size of your instance, you may not be able to handle this traffic. this could be the source of your server constantly crashing.