merten ok we're working on improving the PHP+Apache stack.
In the interim if the 502s are an ongoing problem for your site then email support and we can help you either switch your app to our Nginx+FPM stack or set up a private backend Apache+FPM stack.