Help - since adding an elastic load balancer to my EC2 web application I cannot connect with the MySQL database (not in AWS)

Posted by undefined on Server Fault See other posts from Server Fault or by undefined
Published on 2011-01-11T18:17:05Z Indexed on 2011/01/11 18:55 UTC
Read the original article Hit count: 141

I have a web application that uses an EC2 instance to receive uploaded images, resize and store on S3 and update my MySQL database with the image record. This database is hosted outside Amazon Web Services and so obviously involves communication between the EC2 instance and the database. Images are posted to the upload server from a Flash client which receives the IP address of the upload server when it is loaded and so sends images to 1.12.23.34/resize_script.php

This has worked great .. until i started to try and include a load balancer.

Since the ELBs do not use an IP address but a DNS address I am now passing this to Flash. Now when I upload images I get the following response from the server -

Could not connect to MySQL: Lost connection to MySQL server at 'reading initial communication packet', system error: 111

What might be causing the lost connection to MySQL server. Is there any additional steps I need to take to allow my upload servers to be load balanced? I have set the host property of my MySQL privileges for this user to %

any pointers greatly appreciated thanks.

© Server Fault or respective owner

Related posts about dns

Related posts about mysql