[
https://issues.apache.org/jira/browse/PHOENIX-5812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17080858#comment-17080858
]
Mingliang Liu commented on PHOENIX-5812:
----------------------------------------
[~larsh] I'm not sure that "naturally occurring" lifecycle event is the right
time to check for stale/idle connections.
First, throttling is disabled by default and there is not such "throttling"
time in that case. I think (see above) even without throttling problem, idle
PConnections not being closed is still a concern. Second, when creating
connection is throttled, it will visit all the connections in the queue
(actually a list of queues) in CQSI and close them if they are idle. This can
be time-consuming. Opening a PConnection is usually assumed lightweight
operation by a client (?).
Instead, a separate monitor in my previous comment can be a task of
ScheduledExecutorService. This is not a bad idea to me. What is your concern
about this task/monitor?
> 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)