Most of the scripts in bin/ run java with hard-coded heap size settings (-Xms and -Xmx). Correct me if I'm wrong, but these are not overridable, e.g., with JAVA_OPTIONS, since when an option is set in both JAVA_OPTIONS and in CLI java option arguments, the CLI option arguments are used.
We need a way to override these hard-coded limits in some cases.
#561 is a start, but it's not general, and I'm wondering if there's a better approach here.
@baltzell's more general approach: #561 (comment)