Forums Register Login

Long connection time between MySQL and JDBC

+Pie Number of slices to send: Send

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.
My previous laptop never exploded like that. Read this tiny ad while I sweep up the shards.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 963 times.
Similar Threads
i couldn't run jdbc progam in netbeans
Long connection time between MySQL and JDBC
MySQL database connection fails after long idle
Remote JDBC connection performance question
Advice needed on how to connect to a database in JSP
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 16:08:36.