You could also be hitting a timeout on an idle session - if the client
doesn't perform any operations in a session, then you can configure Impala
to close the session in this fashion. See
https://impala.apache.org/docs/build/html/topics/impala_timeouts.html

On Mon, Aug 5, 2019 at 5:15 PM Thomas Tauber-Marshall <
tmarsh...@cloudera.com> wrote:

> Impala has two client interfaces with slightly different session behavior:
>
> Beewax (default port 21000) - sessions are created when the client connects
> Hiveserver2 (default port 21050) - sessions are created when OpenSession()
> is called
>
> In both cases, sessions can be closed either if
> - the connection ends
> - someone presses "close" on the /sessions page of the debug webui
>
> For hiveserver2, sessions can also be closed if CloseSession() is
> explicitly called by the client
>
> So probably the most likely cause of your issue is that the connections
> are being dropped somehow, possibly due to the load balancer.
>
> If sessions are in fact getting closed due to connections being dropped,
> you should see some lines of the form "Connection from client <client
> hostname> closed, closing <num> associated sessions"
>
> Fwiw, this behavior was recently changed so that hiveserver2 sessions are
> not closed immediately when the connection ends but timeout if there hasn't
> been an associated connection for a configurable timeout:
> https://issues.apache.org/jira/browse/IMPALA-1653 though we haven't done
> a release since that work went in
>
> On Mon, Aug 5, 2019 at 3:40 PM Antoni Ivanov <aiva...@vmware.com> wrote:
>
>> Hi,
>>
>> I am investigating the most common errors we see in our Impala Cluster.
>> The most common is with query status = 'Session Closed'
>>
>> I can see from the code (
>> https://github.com/apache/impala/blob/72c9370856d7436885adbee3e8da7e7d9336df15/be/src/service/impala-server.cc#L1435
>> )
>> that it is set when Session is closed and this happens when connection is
>> closed (ConnectionEnd<
>> https://github.com/apache/impala/blob/72c9370856d7436885adbee3e8da7e7d9336df15/be/src/service/impala-server.cc#L2094
>> >)
>> and this is called when Thrift transport is closed<
>> https://github.com/apache/impala/blob/82f753e3044bd2482f35d137fbb28516fc0ef86c/be/src/rpc/TAcceptQueueServer.cpp>
>> (and query has not completed or failed in some way it would be marked as
>> Session Closed
>>
>> Does this mean that the remote end has simply dropped the connection ?
>> E.g there has been network interruption or someone killed (SIGKILL) the
>> remote process ?
>> We have (TCP) load balancer (HaProxy) and I am wondering if for example
>> Load Balancer tcp timeout can cause such error. Or can client socket
>> timeout cause it?
>>
>> I'd be grateful for any insides into the semantics of when "Session
>> Closed" is set.
>>
>>
>>
>> Thanks,
>> Antoni
>>
>

Reply via email to