Website throwing 504 error

Website causing 504 error randomly, we were able to notice the site becomes heavy when installing plugins or when enabling it network-wide.

Was able to notice this occurring when installing SUMO Memberships & SUMO Subscriptions. we have managed to install these plugins, however, the dashboard is really slow at the moment.