RE: connection pool problem using in Tomcat

From: Carb Simien [MSFT] (CarbinoS_at_online.microsoft.com)
Date: 08/31/04


Date: Tue, 31 Aug 2004 23:21:44 GMT


--------------------
| Thread-Topic: connection pool problem using in Tomcat
| thread-index: AcSMuy5kABS/93PSRZ6MtRi1273r1w==
| X-WBNR-Posting-Host: 202.134.106.86
| From: "=?Utf-8?B?a2FpY2FsbA==?=" <kaicall@discussions.microsoft.com>
| Subject: connection pool problem using in Tomcat
| Date: Fri, 27 Aug 2004 21:55:03 -0700
| Lines: 30
| Message-ID: <22AD57F5-91A6-48C5-81BF-F9B84365D03F@microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.sqlserver.jdbcdriver
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.jdbcdriver:6282
| X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
|
| I use "SQL Server 2000 Driver for JDBC SP3" to connect SQLServer2000
under
| Tomcat App server.
|
| I wish to control the number of physical connections made to the database
to
| 50. Can somebody guide me about this.
|
| At the moment even with as low as 30 concurrent hits we see a very high
| number of phyiscal connection to the database as high as 200.
| I am using the following settings in SERVER.XML
| <Resource name="jdbc/ECTDB" auth="Container"
| type="com.microsoft.jdbcx.sqlserver.SQLServerDataSource"/>
| <ResourceParams name="jdbc/ECTDB">
| <parameter><name>maxActive</name><value>30</value></parameter>
| <parameter><name>maxIdle</name><value>20</value></parameter>
| <parameter><name>maxWait</name><value>10000</value></parameter>
<parameter><name>factory</name><value>com.microsoft.jdbcx.sqlserver.SQLServe
rDataSourceFactory</value></parameter>
<parameter><name>driverClassName</name><value>com.microsoft.jdbcx.sqlserver.
SQLServerDataSource</value></parameter>
| <parameter><name>user</name><value>..</value></parameter>
| <parameter><name>password</name><value>..</value></parameter>
| <parameter><name>driverName</name><value>SQLServer</value></parameter>
| <parameter><name>serverName</name><value>127.0.0.1</value></parameter>
| <parameter><name>portNumber</name><value>1433</value></parameter>
| <parameter><name>databaseName</name><value>..</value></parameter>
| <parameter><name>selectMethod</name><value>cursor</value></parameter>
| <parameter><name>loginTimeout</name><value>60</value></parameter>
| </ResourceParams>
|
|
| Thanks a lot
|
|

If you are using SelectMethod=direct, then it is possible that you are
seeing an increase in connections due to the creation of cloned
connections. These additional connections are necessary because each
statement requires its own connection. Your Tomcat settings have no
bearing on this particular behavior, as it is inherent in the JDBC driver
itself.

Are you using transactions in your code? Can you provide code that
reproduces the problem behavior?

Carb Simien, MCSE MCDBA MCAD
Microsoft Developer Support - Web Data

Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.

Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.



Relevant Pages

  • Re: ConnectionPoolDataSource + MM MySQL + Tomcat4
    ... to work with Tomcat 5.0.28 and MySQL or Oracle. ... <ResourceParams> ... in functions needing DB access, use the DataSource variable ... to create a Connection ...
    (comp.lang.java.programmer)
  • Re: How to kill a connection
    ... > We have a web application (done in java/jsp, running under tomcat ... > So, when the user do the login, we create a connection to this user. ... How do I kill an idle connection? ... username was also logged. ...
    (comp.lang.java.databases)
  • Please Help...
    ... I cannot connect to my database using JNDI., ... but the tomcat 5.5.7 installation is not playing. ... Resource reference to a factory for java.sql.Connection ... connection which says to me server.xml entries are correct. ...
    (comp.lang.java.databases)
  • [PHP] PHP-Java Bridge: Connect PHP to MySQL using JNDI
    ... Tomcat via mod_proxy. ... I also have some JSP code that uses a JNDI connection to the MySQL database ... Now what I want to do is use PHP code to connect to MySQL using JNDI, ...
    (php.general)
  • Tomcat DB2 connection - No suitable driver
    ... I am trying to make a UBD DB2 7.2 connection using the Java ... the connection via tomcat. ... However via tomcat the driver cannot be loaded by the class loader. ...
    (comp.lang.java.databases)

Loading