Handle large exception
Problem symptom: Search service pods run into OOM issues, affecting service availability.
Problem scenario: Search API http request is made with too many clauses in the query.
Problem behavior: In such cases, Search service is responding correctly with 400 response code for input with too many clauses. When it tries to log this error/exception, Search service pod runs out of memory, due to the large size of error message coming from Elastic.
Solution: Log only part of the error message, when the error message is too large.
Edited by Alok Joshi