• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

No. of connections are not increasing

 
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My application(servlet based) is running in Websphere 5.0. It is using DataSource to connect to the DB. We have set max no of connection as 30. But application is not able to grow the connection after around 20. After that it becomes very very slow, and we are bound the restart the application. We were facing this problem in Websphere 3.5 also. That time we thought that WAS 5.0 may be having better connection pool management. So we migrated our application to WAS 5.0. But we are still facing the same problem in WAS 5.0 also.
Any help plz.
 
author
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. What's the database -- sorry for asking, but some folks out there are trying to run against MS Accell 2. Are you sure, as in really sure, as in finally { } clauses, that you are closing the connection no matter what the path of execution is and what exceptions get thrown?
- Peter
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just a wild guess -- maybe you reached the maximum number of sockets enforced by the operating system's configuration?
 
Bartender
Posts: 9615
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Peter den Haan:
Are you sure, as in really sure, as in finally { } clauses, that you are closing the connection no matter what the path of execution is and what exceptions get thrown?
- Peter


]
I second this. I've seen some brain-dead code that leaves Connection instances open eat up memory VERY quickly.
You will also want to make sure your hardware is up to the task. I've seen people try to run application servers on old Pentium 166's with 256Megs of memory alongside Exchange and Oracle. Then complain about how slow Java is. Enterprise-class software requires enterprise-class hardware. If your server's memory is 95% used and it's constantly swapping to disk no code tweaks on the planet will help.
 
Sanjeev Kaushik
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Earlier this application was having connection leakage problem also. That time connection keep on growing. We had set the max no. of connection around 120 that time and when the current no. of connection reach to near to 120, we used to restart the application.
But we have done complete overhauling of the code and fixed the places which caused connection leakage.
But now I am sure there is no connection leakage problem. Resource analyser says that there are around 18 connections at present. But application is not able to make new connections.
Application is running on Sun Solaris 5.7 and DB is Oracle 9i
I need to verify one thing, that how many max no. of sockets we can open at one instance of time.
 
Sanjeev Kaushik
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Websphere 5.0 and Oracle 9i are running on two different machines.
Websphere machine is having 1GB of RAM
 
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think this discussion makes more sense in the WebSphere forum, so I'm moving it.
 
Sanjeev Kaushik
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Moderator,
Could you plz move this discussion to Servlet group. This problem is not specific to Websphere.
After being shifted to this group, discussion is completely stopped.
I was expecting some conclusion in the servlet group.
Plz do the needful.
 
It is difficult to free fools from the chains they revere - Voltaire. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic