How To Know When To Let Go Of A Relationship

We have all had them. Those relationships that really aren't working out for us. So how do you know when it's time to fix it or let it go?