I had that problem with my front derailleur. I discovered that the spring at the bottom of derailleur (hidden from site) had rusted enough to seize up. A little WD40 and moving it back and forth restored it to normal. To see the spring I'm talking about, you will need to turn your bike upside down, backyard mechanics style.