Advanced comment webpart solution stopped working after reaching 5k items. It is loads only but if I remove few comments from the list, it starts working again as long as 5k items will be not reached. Please provide a solution ASAP.

Steps to reproduce:
Arrive at 5k comments
Webpart will stop working
Delete few comments to be again below 5k of comments and you'll see it will work again as long as 5k will be not reached