MySQL Connection Failure since moving to AWS

791 views
Skip to first unread message

Andrew - CFD

unread,
Sep 19, 2013, 5:24:29 PM9/19/13
to ra...@googlegroups.com
Hi,

We move from a dedicated server with Railo and MySQL on the same machine a couple of weeks ago to an AWS setup with an EC2 instance running Amazon Linux and Railo via Tomcat and Apache and MySQL running on the AWS RDS service, however since then we keep getting spates of errors with the following message (the "milliseconds ago" changes in each).

Error Message: Communications link failure The last packet successfully received from the server was 45,596 milliseconds ago. The last packet sent successfully to the server was 45,595 milliseconds ago.

Error Diagnostics: Communications link failure The last packet successfully received from the server was 45,596 milliseconds ago. The last packet sent successfully to the server was 45,595 milliseconds ago. 


I have played around with the MySQL connection settings trying all sorts of different things particularly with the "Connection timeout (in minutes)", "Auto reconnect" and "Validate" settings however nothing fixes the problem.

Has anyone got any suggestions?

Thanks.

Kind regards,

Andrew

Billy Cravens

unread,
Sep 20, 2013, 3:00:37 PM9/20/13
to ra...@googlegroups.com
How are your security groups in RDS set up? Confirm that the EC2 security group your EC2 instance belongs to is part of your RDS security group.

Billy Cravens



--
Did you find this reply useful? Help the Railo community and add it to the Railo Server wiki at https://github.com/getrailo/railo/wiki
---
You received this message because you are subscribed to the Google Groups "Railo" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/railo/eb478c8d-9348-4bd7-99a5-ebbf86a947f5%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Andrew - CFD

unread,
Sep 20, 2013, 3:45:44 PM9/20/13
to ra...@googlegroups.com
Hi Billy,

Yes that is all good, as if it wasn't it wouldn't connect at all, it is only every now and again in spates. Very odd.

Andrew.

Andrew - CFD

unread,
Sep 24, 2013, 5:16:21 AM9/24/13
to ra...@googlegroups.com
Hi All,

Just incase anyone else is having this same issue, it is not a Railo issue, it is an AWS RDS issue. The default innodb_buffer_pool_size is 3/4 of the system memory and it would appear this is too much as the AWS RDS instance was restarting with an out of memory error. I reduced this setting to 1/2 the system memory and it has stopped periodically restarting and as such the periodic instances of these connection failure messages have gone. 

Kind regards,

Andrew.

James Kilford

unread,
Sep 24, 2013, 5:18:32 AM9/24/13
to ra...@googlegroups.com
Interesting stuff that.  What size of AMI are you using? 

James


Andrew - CFD

unread,
Sep 24, 2013, 5:44:47 AM9/24/13
to ra...@googlegroups.com
Hi James,

It is not the EC2 instance that was the problem, it was the RDS instance which is a db.m1.small, which is big enough for what I require, just seems the default settings were not good.

Kind regards,

Andrew.

James Kilford

unread,
Sep 24, 2013, 5:48:25 AM9/24/13
to ra...@googlegroups.com
Thanks, could be useful.  I did my first Railo / AWS project recently, using the MS SQL flavour of RDS and that has so far worked flawlessly.  However, I'm about to do another using MySQL RDS, so I'll keep that at the back of my mind. 

Cheers,

James


Reply all
Reply to author
Forward
0 new messages