Posted By:
Anonymous
Posted On:
Thursday, November 15, 2001 02:58 AM
We've got a problem regarding access to database with Apache JServ 1.1.2 + GNUJSP 1.0.0 + Oracle 8.1.5. We start four instances of Jserv simultaneously in the same server (PIIIx2, 1 Gb RAM). At the beginning, each Servlet/JSP opened its connection with database, but we saw that when it gets up to 400 Apache instances, there are delays of several minutes to obtain the connection, when calling the DriverManager.getConnection. However, if we open a SQLPlus session, even from the same machine, time to response is null. We decided to activate a pool of connections, in one section of our site using OracleConnectionCacheImpl with a Dynamic schema, so each one of the JServs has its own pool. Each pool is managed by a servlet that initialised when its JSer
More>>
We've got a problem regarding access to database with Apache JServ 1.1.2 + GNUJSP 1.0.0 + Oracle 8.1.5. We start four instances of Jserv simultaneously in the same server (PIIIx2, 1 Gb RAM). At the beginning, each Servlet/JSP opened its connection with database, but we saw that when it gets up to 400 Apache instances, there are delays of several minutes to obtain the connection, when calling the DriverManager.getConnection. However, if we open a SQLPlus session, even from the same machine, time to response is null.
We decided to activate a pool of connections, in one section of our site using OracleConnectionCacheImpl with a Dynamic schema, so each one of the JServs has its own pool. Each pool is managed by a servlet that initialised when its JServ starts. We observe that most time the pool works properly, serving pages with no delays. But, very often, apparently without a logical sequence(hour, number of accesses, server load or similar), the pool receives demands for connections and the pool seems to block or queue them, until a few minutes later (sometimes even one hour), looks to accept all connections at the same time and the database is collapsed (Database configuration admitts up to 200 sessions). The traces that we've included in one of pages show this:
[Sun Nov 11 01:22:50 CET 2001]
<8131787> Pool: Obteniendo pool...
(JSP looks for poolÂ’s Servlet del pool in its context)
[Sun Nov 11 01:22:50 CET 2001]
Pool: getConnection...
(Servlet calls to its method getConnection)
[Sun Nov 11 01:22:50 CET 2001]
ConnectionPool: getConnection
(Call to getConnection method of OracleConnectionCacheImpl)
[Sun Nov 11 01:22:50 CET 2001]
ConnectionPool: getActiveSize: 1
(pool size)
[Sun Nov 11 01:22:50 CET 2001]
Pool:
Connection OK (JSP recives one connection of the pool)
[Sun Nov 11 01:23:34 CET 2001]
<5462765> Pool: Obteniendo pool...
[Sun Nov 11 01:23:34 CET 2001]
Pool: getConnection...
[Sun Nov 11 01:23:34 CET 2001]
ConnectionPool: getConnection
[Sun Nov 11 01:23:34 CET 2001]
ConnectionPool: getActiveSize: 1
[Sun Nov 11 01:23:34 CET 2001]
Pool: Conection obtenida
[Sun Nov 11 01:23:35 CET 2001]
<8131788> Pool: Obteniendo pool...
[Sun Nov 11 01:23:35 CET 2001]
Pool: getConnection...
[Sun Nov 11 01:23:35 CET 2001]
ConnectionPool: getConnection
[Sun Nov 11 01:24:07 CET 2001]
<8131789> Pool: Obteniendo pool...
[Sun Nov 11 01:24:07 CET 2001]
Pool: getConnection...
[Sun Nov 11 01:24:07 CET 2001]
ConnectionPool: getConnection
[Sun Nov 11 01:24:31 CET 2001]
<9779709> Pool: Obteniendo pool...
[Sun Nov 11 01:24:31 CET 2001]
Pool: getConnection...
[Sun Nov 11 01:24:31 CET 2001]
ConnectionPool: getConnection
[Sun Nov 11 01:24:32 CET 2001]
<5545111> Pool: Obteniendo pool...
....
....
....
[Sun Nov 11 01:47:34 CET 2001]
Pool: Conection obtenida
[Sun Nov 11 01:47:41 CET 2001]
ConnectionPool: getActiveSize: 36
[Sun Nov 11 01:47:41 CET 2001]
Pool: Conection obtenida
[Sun Nov 11 01:47:41 CET 2001]
ConnectionPool: getActiveSize: 36
[Sun Nov 11 01:47:41 CET 2001]
Pool: Conection obtenida
[Sun Nov 11 01:47:41 CET 2001]
ConnectionPool: getActiveSize: 36
[Sun Nov 11 01:47:41 CET 2001]
Pool: Conection obtenida
[Sun Nov 11 01:47:41 CET 2001]
ConnectionPool: getActiveSize: 36
Any suggestion to this matter? We would very much appreciated your help.