[ 
https://issues.apache.org/jira/browse/PHOENIX-5812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17074085#comment-17074085
 ] 

Pawan Prakash commented on PHOENIX-5812:
----------------------------------------

I think we might not need a separate monitor/daemon thread to keep track of 
long idle connection. Every time a new connection is getting an exception due 
to the limit of maximum allowable connection, it can initiate a 
{{closeAllIdleConnection()}}. 
All the APIs defined by [~liuml07] would still be used as part of closing idle 
connections. 

Also idle-ness should be defined as the time passed since last activity and not 
necessarily the time since connection was opened. We could store this 
information in the connection object.

> Automatically Close "Idle" Long Open Connections
> ------------------------------------------------
>
>                 Key: PHOENIX-5812
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5812
>             Project: Phoenix
>          Issue Type: Improvement
>            Reporter: Daniel Wong
>            Priority: Major
>
> As Phoenix may keep a maximum default number of connections.  Badly 
> performing client calls or internal errors (See PHOENIX-5802).  Can cause 
> total available connections to go to 0.  Proposing a client connection 
> monitor with a connection reaper like task to reap idle connections.
> Definition of "Idle"
> Simple may be simple time based say if a connection has been open for 
> configurable amount of minutes simply close.
> More complicated solution may be keeping track of last interaction time.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to