By moving the part that wasn't scaling off rails. From what I understand they had a giant monolithic rails app which just couldn't scale after a point. They moved to a services-based approach, with a rails frontend talking to scala services.
It got solved is the important thing. From everything I've heard about MySpace, technology was not the real issues but rather management, development pratices, etc.