Hi Doug, Thank for your advise, indeed my project state at begining. So every thing is simple right now. BTW, i already experience on connection pool on my previus ejb project. I will take care on it. As a simple mind, take and go. :-)
Gordon Parsons Technical Services wrote: >Gordon, > >What about resultset and statement? Since this fixes it then you DO have a >leak. Break it down and check each step to make sure that they are returned, >even if an exception is thrown. I have it in finally clauses as a last >resort if it fails normally. There is something leaving the connection >hanging. > >Doug >----- Original Message ----- >From: "Gordon Luk" <[EMAIL PROTECTED]> >To: "Tomcat Users List" <[EMAIL PROTECTED]> >Sent: Friday, March 26, 2004 2:31 AM >Subject: Re: Connection Pool setup. > > > > >>Hi Doug, >> >> O, thanks, it's work... BTW, thanks for remind, and i am the good >>citizen, allway return connection back to pool. ;-) >> >>Gordon >> >>Parsons Technical Services wrote: >> >> >> >>>Gordon, >>> >>>Just for grins and giggles try adding this as a test: >>> >>> <parameter> >>> <name>removeAbandoned</name> >>> <value>true</value> >>> </parameter> >>> >>> <parameter> >>> <name>removeAbandonedTimeout</name> >>> <value>60</value> >>> </parameter> >>> >>>To reclaim abandoned connections. >>> >>>If it drops you back to the min then you have a leak in you app. >>> >>>Check that connections, resultsets and statements are all closed. >>> >>>Doug >>> >>>----- Original Message ----- >>>From: "Gordon Luk" <[EMAIL PROTECTED]> >>>To: "'Tomcat Users List'" <[EMAIL PROTECTED]> >>>Sent: Thursday, March 25, 2004 11:18 PM >>>Subject: RE: Connection Pool setup. >>> >>> >>> >>> >>> >>> >>>>Here my setting... >>>> >>>>My problem is ... Connection pool look like don't open 10 connection at >>>>start-up, and when my servlet run for a while... Let it open up more >>>>connections(over 30) and then wait... (after a night .. :-D)... When I >>>>check database server, it still open more connections, I expect min. for >>>>10 only. >>>> >>>>My setup anything got wrong? Thx. >>>>------------------->8------------------------ >>>><?xml version='1.0' encoding='utf-8'?> >>>>... >>>> <ResourceParams name="jdbc/myjdniname"> >>>> <parameter> >>>> <name>factory</name> >>>> >>>><value>org.apache.commons.dbcp.BasicDataSourceFactory</value> >>>> </parameter> >>>> <!-- Maximum number of dB connections in pool. Make sure you >>>> configure your mysqld max_connections large enough to handle >>>> all of your db connections. Set to 0 for no limit. >>>> --> >>>> <parameter> >>>> <name>maxActive</name> >>>> <value>100</value> >>>> </parameter> >>>> <!-- Maximum number of idle dB connections to retain in pool. >>>> Set to 0 for no limit. >>>> --> >>>> <parameter> >>>> <name>maxIdle</name> >>>> <value>10</value> >>>> </parameter> >>>> <parameter> >>>> <name>minIdle</name> >>>> <value>10</value> >>>> </parameter> >>>> <!-- Maximum time to wait for a dB connection to become >>>>available >>>> in ms, in this example 10 seconds. An Exception is thrown if >>>> this timeout is exceeded. Set to -1 to wait indefinitely. >>>> --> >>>> <parameter> >>>> <name>maxWait</name> >>>> <value>10000</value> >>>> </parameter> >>>> <parameter> >>>> <name>username</name> >>>> <value>myuserid</value> >>>> </parameter> >>>> <parameter> >>>> <name>password</name> >>>> <value>mypassword</value> >>>> </parameter> >>>> <!-- Class name for mm.mysql JDBC driver --> >>>> <parameter> >>>> <name>driverClassName</name> >>>> <value>net.sourceforge.jtds.jdbc.Driver</value> >>>> </parameter> >>>> <parameter> >>>> <name>url</name> >>>> <value> >>>> >>>>jdbc:jtds:sqlserver://myserver/mydatabase;TDS=4.2;charset=big5</value> >>>> </parameter> >>>> <parameter> >>>> <name>validationQuery</name> >>>> <value>select count(*) from tablename</value> >>>> </parameter> >>>> <parameter> >>>> <name>testOnBorrow</name> >>>> <value>true</value> >>>> </parameter> >>>> <parameter> >>>> <name>testWhileIdle</name> >>>> <value>true</value> >>>> </parameter> >>>> <parameter> >>>> <name>timeBetweenEvictionRunsMillis</name> >>>> <value>5000</value> >>>> </parameter> >>>> <parameter> >>>> <name>minEvictableIdleTimeMillis</name> >>>> <value>10000</value> >>>> </parameter> >>>> </ResourceParams> >>>>.... >>>></Context> >>>>------------------->8------------------------ >>>> >>>>Regards, >>>> >>>>Gordon Luk >>>> >>>> >>>> >>>>-----Original Message----- >>>>From: D'Alessandro, Arthur [mailto:[EMAIL PROTECTED] >>>>Sent: Thursday, March 25, 2004 7:03 PM >>>>To: Tomcat Users List; Tomcat Users List >>>>Subject: RE: Connection Pool setup. >>>> >>>> >>>>May help if you post your resource snipplet (replacing any host >>>>/user/passwd info) >>>> >>>>-----Original Message----- >>>>From: Gordon Luk [mailto:[EMAIL PROTECTED] >>>>Sent: Thu Mar 25 05:30:56 2004 >>>>To: Tomcat Users List >>>>Subject: Connection Pool setup. >>>> >>>>Hi All, >>>> >>>> May be I missing understand the DBCP configuration. Anyone could >>>>help ? I want my connection pool are Max 100 connection, 10 conn. At >>>>start-up, max idle 10, when idle for 10 min then kill it. Something like >>>>that. >>>> >>>> Thanks. >>>> >>>> >>>>Regards, >>>> >>>>Gordon Luk >>>> >>>> >>>> >>>>--- >>>>Outgoing mail is certified Virus Free. >>>>Checked by AVG anti-virus system (http://www.grisoft.com). >>>>Version: 6.0.639 / Virus Database: 408 - Release Date: 3/22/2004 >>>> >>>> >>>> >>>>--------------------------------------------------------------------- >>>>To unsubscribe, e-mail: [EMAIL PROTECTED] >>>>For additional commands, e-mail: [EMAIL PROTECTED] >>>> >>>> >>>>--- >>>>Incoming mail is certified Virus Free. >>>>Checked by AVG anti-virus system (http://www.grisoft.com). >>>>Version: 6.0.639 / Virus Database: 408 - Release Date: 3/22/2004 >>>> >>>> >>>>--- >>>>Outgoing mail is certified Virus Free. >>>>Checked by AVG anti-virus system (http://www.grisoft.com). >>>>Version: 6.0.639 / Virus Database: 408 - Release Date: 3/22/2004 >>>> >>>> >>>> >>>>--------------------------------------------------------------------- >>>>To unsubscribe, e-mail: [EMAIL PROTECTED] >>>>For additional commands, e-mail: [EMAIL PROTECTED] >>>> >>>> >>>> >>>> >>>> >>>> >>>--------------------------------------------------------------------- >>>To unsubscribe, e-mail: [EMAIL PROTECTED] >>>For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >>> >>> >>> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> > > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > >