we also have had such errors with the reduce agent, it is a bug in Sitecore (Ref.No. 21517).
Unfortunately, the bug is not fixed yet and we don't have ETA - but it's likely to be fixed in a major update due to complexity.
Please contact Sitecore Support for a hotfix, I do have a link to the hotfix but this one is especially build für Sitecore 8.2.2:
Please find the hotfix available at the following URL:
https://dl.sitecore.net/hotfix/SC%20Hotfix%20167101-2%20Experience%20Analytics%202.0.2.zip
Be aware that the hotfix was built specifically for 8.2 Update 2, and you should not install it on other Sitecore versions or in combination with other hotfixes, unless explicitly instructed by Sitecore Support.
In our project the reduce agent tried to reduce segments on 248 configured sites, the process took more than 4,5 hours until it hungs up and backend performance was very slow. Log entries was like:
20940 08:00:02 WARN All caches have been cleared. This can decrease performance considerably. DEBUG entries have to be enabled in log4net to see the corresponding stack trace.
93336 08:00:02 WARN All caches have been cleared. This can decrease performance considerably.
Best regards
Dirk