Buddypress is generating a huge DB query

My wordpress support notified me:
"We were able to narrow the 502 error to the buddypress plugin, as this is trying to generate a Database Query that is 84,360 characters long.

We actually block Queries that are over 16,000 long, as this usually means that the Query is very slow and will typically slow down the site quite a bit."

Any suggestions?