How to close idle connections

2008-04-28 Thread Enrico Sasdelli
Hi all, I use tomcat-6.0.14 and postgresql-8.1 with JNDI connection pool, after a while, my web application (written in Java/JSP), creates many database connections and postgres processes. But all of these connections are signed as Idle, I want to close this idle connections to avoid getting to

Re: How to close idle connections

2008-04-28 Thread David Smith
I see you have maxIdle=20. Do you have more that 20 connections sitting idle? Is this really that much of a concern? As long as the connections are released (closed) and returned to the pool, I don't see the problem. The entire idea of a connection pool is the system keeps around a set of

R: How to close idle connections

2008-04-28 Thread Enrico Sasdelli
Thanks for reply, I see you have maxIdle=20. Do you have more that 20 connections sitting idle? Is this really that much of a concern? As long as the connections are released (closed) and returned to the pool, I don't see the problem. No, I have at most 20 idle connections, that's goes

Re: R: How to close idle connections

2008-04-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Enrico, Enrico Sasdelli wrote: | No, I have at most 20 idle connections, that's goes right, but my boss want | [fewer] idle connections to avoid to overload the database server. So there | isn't way to close an idle connection to remove the relative

R: R: How to close idle connections

2008-04-28 Thread Enrico Sasdelli
Christopher Schultz wrote: | Enrico Sadelli wrote: | If so, I will set maxIdle=2 and everyone will be happy (especially me :) That's it! But I suspect that this setting will reduce your performance, especially if you have an application with lots of db access and sporadic traffic patterns. -

Re: R: How to close idle connections

2008-04-28 Thread David Smith
No, I have at most 20 idle connections, that's goes right, but my boss want less idle connections to avoid to overload the database server. So there isn't way to close an idle connection to remove the relative process? If so, I will set maxIdle=2 and everyone will be happy (expecially me :)

Re: R: How to close idle connections

2008-04-28 Thread Alan Chaney
David Smith wrote: No, I have at most 20 idle connections, that's goes right, but my boss want less idle connections to avoid to overload the database server. So there isn't way to close an idle connection to remove the relative process? If so, I will set maxIdle=2 and everyone will be

Re: R: How to close idle connections

2008-04-28 Thread Andrew Miehs
On 28/04/2008, at 4:59 PM, Alan Chaney wrote: David Smith wrote: No, I have at most 20 idle connections, that's goes right, but my boss want less idle connections to avoid to overload the database server. So there isn't way to close an idle connection to remove the relative process? If

R: R: How to close idle connections

2008-04-28 Thread Enrico Sasdelli
David Smith wrote: I'll bet money the added, idle postgres connections are just sleeping while they wait for work. Given idle connections contribute virtually no additional load, don't see his argument that idle connections contribute to a database overload. If the minor increase in overhead

Re: R: How to close idle connections

2008-04-28 Thread David Fisher
On Apr 28, 2008, at 9:59 AM, Alan Chaney wrote: David Smith wrote: No, I have at most 20 idle connections, that's goes right, but my boss want less idle connections to avoid to overload the database server. So there isn't way to close an idle connection to remove the relative

Re: R: How to close idle connections

2008-04-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David, David Smith wrote: | I'll bet money the added, idle postgres connections are just sleeping | while they wait for work. Given idle connections contribute virtually | no additional load, don't see his argument that idle connections |

Re: R: How to close idle connections

2008-04-28 Thread Alan Chaney
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David, David Smith wrote: | I'll bet money the added, idle postgres connections are just sleeping | while they wait for work. Given idle connections contribute virtually | no additional load, don't see his argument