Back before my vacation, I mentioned the problem of judging how long a drug project should be allowed to run. You have to call a halt eventually, because it's very rare for a project to finish of its own accord - by which I mean "arrive at a conclusion that no one can argue about or wish to change."
That goes for either kind of conclusion. It's difficult for a project to fail so conclusively that no one wants to take just one more crack at it. Maybe you haven't been dosing the right way, or in the right formulation, or in the right sort of animal. There's always another series of compounds to try; success could be just around the ol' corner. Sometimes it is - there are some tremendously successful drugs that nearly died several times in preclinical development, until someone found a way to defibrillate the project and make it get off the floor.
I have managed to totally kill one at least once in my career, though, when we showed that there was an insurmountable side effect problem caused by the exact same enzyme that we were already targeting. Turns out that it does two different things in different tissues, and any inhibitor is thus going to run into the same problem. Not a thing you can do about it.
And on the successful side, it's unusual for a compound to do everything you want it to - potent, selective, good oral dosing, no side effects, cheap and easy to make on large scale. Most of the time, you're faced with an array of compounds, each of which might do the job, each with a different pattern of potential defects. If you'll only accept a perfect compound, you'll spend years crawling up the asymptotic curve, spending ever more money to fix ever smaller problems. You just have to call a halt at some point and declare that what you have is good enough. (This is no doubt sounding very familiar to the engineers out there.)
But when do you reach that point? I wish I had a general answer. (If I had one, I'd probably be writing this from my private island estate.) Clearly, for a bigger potential payoff you should be willing to spend more money and take more time. A potential breakthrough therapy should get several chances to come back from the grave, which is why (as I mentioned above) there's a disproportionate number of such stories among the blockbuster drugs.
But having your project nearly die doesn't mean that it's going to be a winner; that's not how you join that club. The sixth-on-the-market therapy for toenail fungus could just as easily be an exciting development story for those involved; it doesn't mean that it was worth doing.