If there had been a clear formula for success, it would have been very valuable. However, one element for success is to have people you mesh well with. People who think somewhat alike to how you think. Checking the history of the people your RP with is also a good idea. For example, some people will be very skittish, easily jumping between RPs. What you want for a long-lasting RP is people that stick around no matter what happens. Unfortunately, those aren't always easy to find. after all that comes the stuff like making sure the RP is capable of running long, that the players and player characters fit well together.