Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9214611
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:00:29+00:00 2026-06-18T02:00:29+00:00

For our application, setup on the Amazon EC2 instances, we are using MySQL databases,

  • 0

For our application, setup on the Amazon EC2 instances, we are using MySQL databases, installed on 2 EC2 instances, in master-master replication mode. To load balance these DB Servers I am using an HAProxy deployed on another EC2 instance with configuration

listen  mysql <public dns of haproxy>:<port>
mode tcp
balance roundrobin
server mysql-db-s1 <elastic ip of db server1>:<port> maxconn 2000
server mysql-db-s2 <elastic ip of db server2>:<port> maxconn 2000

All three instances are assigned elastic ip’s and I use the public dns of haproxy to connect from my application. But at times I get the error

 `com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: C
  ommunications link failure The last packet successfully received from the server was  58,085 milliseconds ago.  
  The last packet sent successfully to the server was 0 milliseconds ago.`

Has this anything to do with the configuration I have given here? Is it better to use the elastic ip’s instead of Public DNS ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T02:00:30+00:00Added an answer on June 18, 2026 at 2:00 am

    This was not essentially an HAProxy issue, as I got the same error after I connected directly to one of the databases. Tuned the database a little and fixed some code in my application, and now I am not getting this atleast for the past 12 hours. Thanks for the suggestions. I would be moving one of the DB to another availability zone.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a PHP application using our XAMPP setup as a test server.
Our application is a bit slow to load at startup, i'm wandering myself if
Our application downloads data from the internet using RSS but is having connection problems
I am using Windows Server AppFabric Caching in our application with local cache enabled.
I'm writing a setup-application for our web application. One of the tasks is to
We currently have one dynamic web project (our main web application) already setup on
We are using SQL Azure for our application and need some inputs on how
In our WPF applicaiton, we're using WindowStyle=None in order to give our application a
We have really strange and inconsistent behavior with Linq-to-SQL here. Our application is installed
i am interested in creating a setup tool for our business application which is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.