You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by ericp56 <er...@twcable.com> on 2009/12/16 17:13:56 UTC

G2.1.4, Pool Max Size not working

Hello,

I have a DB Pool with a max pool size of 40.

However, when the DBA looks in the DB, he sees 300 connections!

Using netstat, I can see those 300 established connections.

If I restart the applications, the connections stay there.

If I restart the J2EE connector, the connections are closed.

I'm using G 2.1.4, oracle DB, Oracle 11 jdbc 5 driver.

99% of the time, it stays <=40 connections.

Is there a bug in 2.1.4 enforcing the max pool size?  Or, does this suggest
I look at anything in particular?  I'm reviewing the apps...

Thanks,

Eric
-- 
View this message in context: http://old.nabble.com/G2.1.4%2C-Pool-Max-Size-not-working-tp26813776s134p26813776.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: G2.1.4, Pool Max Size not working

Posted by ericp56 <er...@twcable.com>.
Thanks for your comments, David.

Here's the issue:

https://issues.apache.org/jira/browse/GERONIMO-4993

Eric
-- 
View this message in context: http://old.nabble.com/G2.1.4%2C-Pool-Max-Size-not-working-tp26813776s134p26857432.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: G2.1.4, Pool Max Size not working

Posted by David Jencks <da...@yahoo.com>.
On Dec 18, 2009, at 1:30 PM, ericp56 wrote:

>
> I can do it in 2.2, too.
>
> My last build was on 11/11.  I'll try a new build.
>
> I have a small WAR project I am using to recreate it.
>
> Meanwhile, I'll be digging into the source.
>
> David, Should I hit the dev forum with this?

The best would be if you can enter a jira and include your app that  
shows the problem.  I'm really pretty surprised at this....

thanks
david jencks

>
> Thanks,
>
> Eric
>
> -- 
> View this message in context: http://old.nabble.com/G2.1.4%2C-Pool-Max-Size-not-working-tp26813776s134p26849977.html
> Sent from the Apache Geronimo - Users mailing list archive at  
> Nabble.com.
>


Re: G2.1.4, Pool Max Size not working

Posted by ericp56 <er...@twcable.com>.
I can do it in 2.2, too.  

My last build was on 11/11.  I'll try a new build.  

I have a small WAR project I am using to recreate it.

Meanwhile, I'll be digging into the source.  

David, Should I hit the dev forum with this?

Thanks,

Eric

-- 
View this message in context: http://old.nabble.com/G2.1.4%2C-Pool-Max-Size-not-working-tp26813776s134p26849977.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: G2.1.4, Pool Max Size not working

Posted by ericp56 <er...@twcable.com>.
OK, I can now recreate it.

I created a DB pool named Oracle with a max pool size of 3.

I modified my config.xml to limit the ejb pool size to 5:

    <module name="org.apache.geronimo.configs/openejb/2.1.3/car">
        <gbean name="EJBNetworkService">
            <attribute name="port">${OpenEJBPort + PortOffset}</attribute>
            <attribute name="host">${ServerHostname}</attribute>
            <attribute name="threads">5</attribute>
        </gbean>
    </module>

I have a simple jsp servlet. Snippet:
try {
	ctx = new InitialContext();
	ds = (DataSource) ctx
			.lookup("java:comp/env/jdbc/Oracle");
	con = ds.getConnection();
	Thread.sleep(30000);
} catch (Exception e) {

When there are plenty of NetworkService ejbs (i.e. 20) I'll get the
ManagedConnection exception for my 4th post.

When there are 5 NetworkService ejbs, I can go beyond the limit of the 3
pooled connections.

I wait for the requests to complete ("watching busy threads current" in
monitoring), then I can go make a bunch of requests and more connections are
opened.  I got up to 20 and grew bored ;)

After their idle timeout setting expires, they close.

I'm running 2.1.3  I'll try this with 2.2, to see if it's in there, too.

Eric

-- 
View this message in context: http://old.nabble.com/G2.1.4%2C-Pool-Max-Size-not-working-tp26813776s134p26848815.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: G2.1.4, Pool Max Size not working

Posted by ericp56 <er...@twcable.com>.
I'm going to create some test apps to recreate the condition.

I think I have that part figured out, at least:)

Eric
-- 
View this message in context: http://old.nabble.com/G2.1.4%2C-Pool-Max-Size-not-working-tp26813776s134p26830585.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: G2.1.4, Pool Max Size not working

Posted by David Jencks <da...@yahoo.com>.
I don't think I've seen this kind of error before.  At some point we  
have fixed a bug in the pooling code that tended to make no  
connections available to apps if enough connection errors occurred.

Can you look into whether any connection errors occurred?  I'm not  
sure but would hope these would end up in geronimo.log.

thanks
david jencks

On Dec 16, 2009, at 8:13 AM, ericp56 wrote:

>
> Hello,
>
> I have a DB Pool with a max pool size of 40.
>
> However, when the DBA looks in the DB, he sees 300 connections!
>
> Using netstat, I can see those 300 established connections.
>
> If I restart the applications, the connections stay there.
>
> If I restart the J2EE connector, the connections are closed.
>
> I'm using G 2.1.4, oracle DB, Oracle 11 jdbc 5 driver.
>
> 99% of the time, it stays <=40 connections.
>
> Is there a bug in 2.1.4 enforcing the max pool size?  Or, does this  
> suggest
> I look at anything in particular?  I'm reviewing the apps...
>
> Thanks,
>
> Eric
> -- 
> View this message in context: http://old.nabble.com/G2.1.4%2C-Pool-Max-Size-not-working-tp26813776s134p26813776.html
> Sent from the Apache Geronimo - Users mailing list archive at  
> Nabble.com.
>


Re: G2.1.4, Pool Max Size not working

Posted by Fredrik Jonson <fr...@jonson.org>.
In <26...@talk.nabble.com> ericp56 wrote:

> I have a DB Pool with a max pool size of 40. However, when
> the DBA looks in the DB, he sees 300 connections!

That sounds strange. Are you sure those connections are established,
and not merely in TIME_WAIT, ie already terminated connections waiting
to time out?

It may also be a database driver specific issue, what driver are you using?

How does your data source deployment plan look? There should be a max-size
value in the connection pool section of the connector configuration.

Hard to say what's wrong without seing the deployment plan.

-- 
Fredrik Jonson