This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Long connection time between MySQL and JDBC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Long connection time between MySQL and JDBC" Watch "Long connection time between MySQL and JDBC" New topic
Author

Long connection time between MySQL and JDBC

Lilian Chase
Greenhorn

Joined: Jun 14, 2010
Posts: 24

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Long connection time between MySQL and JDBC
 
Similar Threads
MySQL database connection fails after long idle
Long connection time between MySQL and JDBC
Remote JDBC connection performance question
i couldn't run jdbc progam in netbeans
Advice needed on how to connect to a database in JSP