Fix out of memory error for mainthread-io job.