Hi Ke,
It sounds like you're writing your failed records to your CMS database, it's filling up and bringing down your whole application. Are you using BI Platform or IPS with IS? Have you configured a job server connection and provisioned a separate database where you can write your failed records? Once that is setup then your exports should write to a separate staging database rather than your default cms database, which is risky.
Thanks,
Chris