We have a bunch of logging output here for other things, including the max heap size, but the failure check needs to happen earlier than this, and also needs to do the computation.