This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
    Bookmark Topic Watch Topic
  • New Topic

Long connection time between MySQL and JDBC

 
Lilian Chase
Greenhorn
Posts: 24
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator

Hi everyone,

I have a web application running on Tomcat that accesses data from a MySQL database.

However the time taken to establish a connection is very long.

The function that I'm using to connection to the database is



It takes an average of 9 seconds to establish the connection. Query time is <1s depending on record size.

However, running the same function from Netbeans takes less than <1s from the same machine.

Hence, I would like to know if there's additional delay or firewall accessing the MySQL from Tomcat web application as compared to a direct connection.
 
Campbell Ritchie
Sheriff
Pie
Posts: 47262
52
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Closing as apparently a duplicate of this thread.
 
I agree. Here's the link: http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic