We get a lot of 504

We get a lot of 504 errors running WPMUDev plugins on a dedicate server hosted by WPengine.

The page request was canceled because it took too long to complete
What can I do?

See this video: https://goo.gl/76r42p

This is what WPengine are saying:
504's happen on our platform for a very specific reason.
We have a system in place that we call Nginx Queueing, whose job it is to prevent Apache from being completely overloaded. This can save the server from destructively high load.

Within Apache, where all of your PHP and MySQL is processed, there are a fixed number of child-processes that are able to work through a website’s requests. In other words, Apache can only multi-task and serve 10 webpage requests at once in its active-process queue. Once Apache's hands are full, incoming requests go into the Nginx Queueing backlog which can hold an additional 25 backlogged requests.

When Apache finishes processing a page request, the next backlogged request is given to Apache to perform. If requests continue to come in faster than they go out, the backlog will fill up. With both Apache and the backlog full, new incoming requests are evicted and you see a 504.

Note that this only affects non-cached hits. Cached hits are served from Varnish without ever needing to contact Apache and therefore never have to wait on Apache in the NGINX queue.

Ultimately what this means that WPMUDEV plugins are not doing what it promis.
All my other sites are running fine on this same server and are not triggering 504s to load!

I can see in my log, that the plugins shows that the site has received over 3 thousand hits from my own IP address, compared to 475 hits for the second most-seen IP. That is my loops over and over again.

We need this fixed!

I can confirm all hits to admin-ajax.php are uncached, likely this is where the bulk of the issue comes from, as it's the most requested resource.