This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JDBC and the fly likes Very slow to hook up to MySQL db Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Very slow to hook up to MySQL db" Watch "Very slow to hook up to MySQL db" New topic
Author

Very slow to hook up to MySQL db

joseph corner
Ranch Hand

Joined: Feb 20, 2004
Posts: 50
Hi all,
I have a java web app which connects to a MySQL database, using a datasource which i have defined in tomcat's server.xml, DefaultContext tag, as follows:



When I restart the web server with the java app, the connection works without problems. If I then go away and come back an hour later, and try to connect to the db again in my web app, it takes aaaaages to connect to the db. It doesn't time out, it just takes a looong time to connect and display the page with the results. (10 mins?) I am closing all my resultsets, statements and connections in my servlet code.
Once the connection is finally made, the web app seems to run OK. Any ideas what might be wrong?

Thanks.
[ March 15, 2007: Message edited by: joseph corner ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Very slow to hook up to MySQL db
 
Similar Threads
connection pooling problem
Connectionpooling in tomcat 5.5
Context and WAR file
Datasource
~~ Newbie question - database ~~