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

Josh Elser commented on PHOENIX-5812:
-------------------------------------

bq. The reason is, PConnection if not closed, for 1) it will not decrease the 
connection count, for 2) it will not get removed from the queue by the renew 
lease task. For the two problems I think 1) is observable and user is affected 
while 2) is more a performance problem and not very critical since the 
reference to PConnection is weak in CQSI

If the scope of what you want to try to do is #1, I think that's fine for this 
Jira issue. #2 is the much bigger concern to me, IMO. I think avoiding hitting 
the limit on the maximum number of collections is a much smaller and easier 
problem to handle.

My desire to give input is very much from a #2 because this is the problem I 
have seen many customers run into. I was hoping that you were going to solve 
this problem, but if that is not part of your current goal, that's fine too. I 
think some simple rules about when a PConnection will be automatically closed 
is fine, as long as we are very clear about those in our documentation 
(re-opening them makes that risk very low). Your 4 points seem like a good 
solution.

> 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