You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2019/06/21 04:36:00 UTC

[jira] [Commented] (IMPALA-7802) Implement support for closing idle sessions

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

ASF subversion and git services commented on IMPALA-7802:
---------------------------------------------------------

Commit 67cd55e0445d037d834ecd120d08b0948b064491 in impala's branch refs/heads/master from Michael Ho
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=67cd55e ]

IMPALA-7802: Close connections of idle client sessions

Previously, if idle session timeout is set either via
startup flag or query options, a client session will expire
after that set period of inactivity. However, the network
connection and the service thread of an expired session will
still be around until the session is closed by the client.
This is highly undesirable as these idle sessions still count
towards the quota bound by --fe_esrvice_threads, so if the
total number of sessions (including the idle ones) reaches
that upper bound, all incoming new session will block until
some of the existing sessions exit. There is no time bound on
when those expired sessions will be closed. In some sense,
leaving many idle sessions opened is a denial-of-service attack
on Impala.

This change implements support for closing expired client sessions.
In particular, a new flag --idle_client_poll_time_s is added to
specify a time interval in seconds of client's inactivity which
will cause an idle service thread of a client connection to wake up
and check if all sessions associated with the connection are idle.
If so, the connection will be closed. This allows the service threads
to be freed up without waiting for client to close the connections.

Testing done:
- core build
- new targeted test which verifies the connections of expired sessions
are closed.
- verified the flags function as expected in a secure cluster with Kerberos + SSL

Change-Id: I97c4fb8e1b741add273f8a913fb0967303683e38
Reviewed-on: http://gerrit.cloudera.org:8080/13607
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>


> Implement support for closing idle sessions
> -------------------------------------------
>
>                 Key: IMPALA-7802
>                 URL: https://issues.apache.org/jira/browse/IMPALA-7802
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Clients
>    Affects Versions: Impala 3.0, Impala 2.12.0
>            Reporter: Michael Ho
>            Assignee: Michael Ho
>            Priority: Critical
>              Labels: supportability
>         Attachments: image-2019-04-12-11-14-42-938.png
>
>
> Currently, the query option {{idle_session_timeout}} specifies a timeout in seconds after which all running queries of that idle session will be cancelled and no new queries can be issued to it. However, the idle session will remain open and it needs to be closed explicitly. Please see the [documentation|https://www.cloudera.com/documentation/enterprise/latest/topics/impala_idle_session_timeout.html] for details.
> This behavior may be undesirable as each session still consumes an Impala frontend service thread. The number of frontend service threads is bound by the flag {{fe_service_threads}}. So, in a multi-tenant environment, an Impala server can have a lot of idle sessions but they still consume against the quota of {{fe_service_threads}}. If the number of sessions established reaches {{fe_service_threads}}, all new session creations will block until some of the existing sessions exit. There may be no time bound on when these zombie idle sessions will be closed and it's at the mercy of the client implementation to close them. In some sense, leaving many idle sessions open is a way to launch a denial of service attack on Impala.
> To fix this situation, we should have an option to forcefully close a session when it's considered idle so it won't unnecessarily consume the limited number of frontend service threads. cc'ing [~zoram]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org