tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smith <d...@cornell.edu>
Subject Re: R: How to close idle connections
Date Mon, 28 Apr 2008 14:19:33 GMT
>
>
>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 :)
>  
>


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 
due to sleeping threads actually overloads the database, you need to let 
your boss know the server hardware is way too frail for production use 
and needs to be upgraded. 

--David

Enrico Sasdelli wrote:

>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 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 :)
>
>
>Thank you, 
>
>Enrico
>
>
>  
>
>>The entire idea of a connection pool is the system keeps around a set of 
>>idle connections for borrow.  When you code get's a connection, it comes 
>>    
>>
>>from the pool of idle connections and returned when you close the 
>  
>
>>connection.  This speeds up your application by elliminating the 
>>overhead of contacting the server and constructing a new connection 
>>whenever you call for one.  The pool just grabs a pre-made one off the 
>>shelf for you.
>>    
>>
>
>  
>
>>--David
>>    
>>
>
>---------------------------------------------------------------------
>To start a new topic, e-mail: users@tomcat.apache.org
>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>  
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message