You get the same issues almost no matter what you write a website in, whether it's PHP, C#, Rails, or node.js. When you get to the level of scale that Facebook is at you are in a realm that conventional web application tooling and frameworks don't cover. If anything the "best" and most trusted platform for what facebook is doing today would be java. Does that mean java is the "best" web platform? Not in the least.
The central fallacy here is imagining that one size could or should fit all, whether it's php or rails or anything.
The central fallacy here is imagining that one size could or should fit all, whether it's php or rails or anything.