The muscles in question are telling you that they are currently not capable of doing what you are asking of them. They're telling you that if you keep it up at the current pace, there will be a mutiny. Speaking from lots of experience, if you back it off enough and stay in the "nearly cramping" zone, you'll be ok and get through the ride. On the other hand, if you keep pushing when the muscles are sounding the alarm, you are destined to make the call of shame. The worst is when 1 leg locks extended while the other locks bent. The pain is horrible. You can't get your feet unclipped and you fall over writhing in pain flailing away trying to get away from the bike. Been there, done that.