• 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

Firewall timing out connections in Pool - Commons DBCP

 
Ranch Hand
Posts: 430
Android VI Editor Debian
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using the Commons DBCP connection pool to manage my connections. Everything works fine but recently i found out that every morning i try to make a request, the application takes at least 9 minutes to process the request. Subsequent requests take just seconds.

I have tried to trace this and found out that since i set the connection pool to keep at least two connections alive, the next day i try to make a connection these two connections are reused. The problem is there is a firewall which resets every connection after every hour.

So the problem is the firewall is invalidating the connections and its taking my application too long to find out that a connection has been reset before it creates a new one.

I could try and re-write the DBCP connection pool to send "keep alives" but i dont think this is wise as how will i know which connection to send the keep alive for?

Does anyone have any idea how i can solve this? Or is there a setting on DBCP that will do this for me?

Here are my default values on the pool
 
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We had a similar problem, so we set life time for a connection to 30 minutes. However we use a home made pool. I noticed that WL connection pool gives the same level of control, even better. So check documentation for your connection pool, it's common problem and should be covered by settings.
 
Hey, sticks and stones baby. And maybe a wee mention of my stuff:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic