• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

connection hangs

 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a servlet that connects to a database no problem when tomcat has been recently re-started, but after some time has elapsed, even if there aren't any users on the system, it takes a very long time to get a connection object and eventually just fails completely. Does anyone know what this might be please? Or suggest ways I might be able to de-bug the problem. I'm using tomcat4 on linux, the database is on a remote box from the webapp
Many thanks.
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
are you closing and releasing your connections ?? Maybe you should use a connection pool (of your container or some free) to handle your connections and don't do that directly in your servlet.
 
Peter Straw
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes I'm closing the ResultSet, Statement and Connections. I'm using the dbcp connection pool from the Jakarta Commons package but I'm not sure that it's a problem with the pool as it happens on another site I'm writing that doesn't use pooling.
 
Yeah, but is it art? What do you think tiny ad?
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic