• 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

connpool_max_limit help

 
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using Tomcat/Oracle 10g / hibernate to generate connection to database,
I have a question, on max connection pool
How do I determine when it hits the max limit and don't let user access into the connection pool

Let's say , set the CONNPOOL_MAX_LIMIT to 10. If the connection pool is exceeding 10, I want to warn a user that max out the connection pool, have to come back to lauch the page or something like that.

Thanks
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jay,
Why would you want to do that? The point of a connection pool is that as soon as a connection is done, another query can use it. This means you can have way more than 10 users on the system. What would be the advantage of throwing a user out just because for a second all connections are in use?
 
jay lai
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
The reason is trying to narrow down the connection to database , since we got a very slow performance in term of get the result back from the query.
If you got any ideas how to approach this, greatly thank you

Right now I try to put some connpool_nowait, --> as describe in OracleOCIConnectionPool class , turn on to TRUE, which mean, if it is true, and the pool connection are all busy, and hit the max connection pool, then error will throw , BUT IT NOT throwing any error, it keeps letting open many browser to access the webpage.

IDeas? Thought?
 
jay lai
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can anyone help on this.
I use OracleOCIConnectionPool API to create connection pool,
I would like to limit the number of user who connect to the app when the connection pool are hit the max and all busy. how do I do that?

 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
THis is not a job for the Connection Pooling, you should configure the number of worker threads in your application to match the allowed connection pool size.
 
jay lai
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks David for your reply, so is there any sample code or example to do that on the thread side of the apps
Thnks in advance
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It sounds like you're using the Oracle application server, I'd check their docs. In Tomcat, you set the number of worker and queue threads in Connection configuration in the server.xml or context.xml
 
jay lai
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
David-- thnks for the feed back, do you have that url for the reference by any chance, i google, but not have many successful result that specificly mention about it.
Regards.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HTTP - http://tomcat.apache.org/tomcat-6.0-doc/config/http.html
AJP - http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html

Note that both have a 'maxThreads' attribute, or can be overridden by a value in an associated Executor (all slightly different in other Tomcat versions)
 
jay lai
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks David- i am looking into it, see if it works for my case!!
 
jay lai
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tested out and set the maxThreads =2 in server.xml under c:\tomcat\conf\server.xml, it seems not doing anything

any more suggestion? thanks
 
Blueberry pie is best when it is firm and you can hold in your hand. Smell it. And smell this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic