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 8833779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:51:47+00:00 2026-06-14T08:51:47+00:00

My environment have 2 MySQL server (INS1 and INS2) and when I tested failover

  • 0

My environment have 2 MySQL server (INS1 and INS2) and when I tested failover mode with down INS1 and driver creat connection to INS2 it has very very slow to connected (It has occur on Glassfish connection pool too.)

final String connstr = "jdbc:mysql://INS1,INS2:3306/mysql";
Properties props = new Properties();
props.put("user", "xxx");
props.put("password", "xxx");
props.put("failOverReadOnly", "false");
props.put("roundRobinLoadBalance", "false");

return DriverManager.getConnection(connstr, props);

How to tune jdbc properties?

run: When INS1 run. INFO: Connected in 350 ms

INFO: Connected in 16 ms

INFO: Connected in 15 ms

INFO: Connected in 17 ms

INFO: Connected in 15 ms

INFO: Connected in 16 ms BUILD SUCCESSFUL (total time: 0 seconds)

run: When INS1 down. INFO: Connected in 1,380 ms

INFO: Connected in 1,060 ms

INFO: Connected in 1,058 ms

INFO: Connected in 1,060 ms

INFO: Connected in 1,055 ms

INFO: Connected in 1,041 ms BUILD SUCCESSFUL (total time: 6 seconds)

  • 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-14T08:51:49+00:00Added an answer on June 14, 2026 at 8:51 am

    //Timeout for socket connect (in milliseconds), with 0 being no timeout. Only works on JDK-1.4 or newer. Defaults to ‘0’.
    props.put(“connectTimeout”, “100”);

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

Sidebar

Related Questions

In my production environment, I have a single instance of MySQL server running on
I have config.time_zone in environment.rb set to UTC, and my mySQL server returns the
I have a problem with MySql.Data in a partial trusted environment. I've added MySql.Data
We're using MySQL with Innodb Engine storage. We have an evented environment that sends
In our Production environment we have JBoss running in a clustered mode with 4+
I have a stored procedure on mysql. It worked on my local MAMP environment,
I've dumped a MySQL database I have on my local MAMP server into a
I have some problems when using mysql. My environment is wamp, the problem occurred
I work extensively with MySQL and have no experience with SQL Server. But I
I have my dev environment set up as a Ubuntu Server (with LAMP installation)

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.