• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Very slow to hook up to MySQL db

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic