When creating a custom output using HTML, a size limit of 40MB is imposed. Unlike other size limits, there is no work-around for this. It should be possible to return HTML outputs larger than 40MB if required.