Resolving hanging commands

This topic describes how to address queries that do not respond during the compilation phase in HiveServer2.

Condition

Queries hanging during compilation can significantly impact HiveServer2 performance and user experience. Understanding the underlying cause and applying appropriate configuration adjustments are essential for resolving such issues and ensuring stable query execution.

Queries do not respond during the compilation phase.

Cause

The thread pool configuration is often insufficient for handling concurrent client requests, leading to delays or commands that never complete.

Remedy

  1. hive.server2.async.exec.threads, hive.server2.async.exec.wait.queue.size, hive.server2.thrift.max.worker.threads
    Increase the background thread pool to accommodate more concurrent connections by configuring the above properties in Hive on Tez Configuration.
  2. Perform a service restart to activate the new settings.