Prevent memory size exhaustion.