The sanitization tool is failing and generating an out-of-memory error when executed against millions of tickets. It works fine with less load.
Run the Sanitization tool as per the tech doc, refer to HTML Tags Sanitization:
It will give the following error when there are millions of rows
CA Service Desk Manager 17.4 RU4
The sanitization tool has been enhanced and the fix is included in 17.4 RU5.
The fix is to ensure that the tickets will be processed as a batch. The default batch size is 10k tickets - this can be customized by giving a different value at the beginning. However, it is recommended to keep the default batch size, which is 10k.