I have a huge problem with performance of CP (EE 3.3.4). Sometimes I can see the 504 error (at the same time PHP works like crazy!). New Relic says that I use all php sources and probably that's why CP is down.
Did you have similar problems? If so, what shoud I'm looking for?