Clone
Kunal Khatua
committed
on 07 Jun 18
DRILL-6477: Drillbit crashes with OOME (Heap) for a large WebUI query
For queries submitted through the WebUI and retrieving a large result-… Show more
DRILL-6477: Drillbit crashes with OOME (Heap) for a large WebUI query

For queries submitted through the WebUI and retrieving a large result-set, the Drillbit often hangs or crashes due to the (foreman) Drillbit running out of Heap memory.

This is because the Web client translates the result set into a massive object in the heap-space and tries to send that back to the browser. This results in the VM thread actively trying to perform GC if the memory is not sufficient.

The workaround is to have the active webConnection of the query periodically timeout to allow for checking the consumed heap-space. A level of 0.85 (i.e. 85%) is set as default threshold, crossing which, a query submitted through the REST API is marked and failed.

In addition, a user exception is thrown, indicting the cause of the query failing, along with alternative suggestions for re-executing the query.

closes #1309

Show less

master + 4 more