pedal falling off axis One of the pedal arms in my bike is loosening off the crank every so often. When it starts to happen, the pedal arm, that has square ends, and the nut will end up detaching from the crank, so I have to tighten it back up with a socket wrench like the one in the picture below as tight as I can, but after a few weeks it will start to loosen again. Everything else seems to be ok otherwise.



What can I do to fix this problem permanently?
Is it the pedal or the crank arm?  I'm presuming the crank arm, since you wouldn't tighten a pedal with a socket wrench.

If the crank arm is coming lose regularly then most likely the "socket" in the arm, where it attaches to the crank axle, has become deformed from riding it loose.  

But it's possible that you've just not been tightening the crank bolt tight enough -- it needs to be VERY TIGHT.  (The Park Tools website has torque specifications for many brands, if you want to look there.)

You can lessen the chance of the bolt loosening by using a removable thread lock compound on the bolt.  Also, if the crank axle has square (vs splined) ends and the crank arm socket has become badly deformed, a clever person can make shims from a pop/beer can to eliminate the "play" -- not a permanent fix, but enough to squeeze a few more months of use from the setup before you must replace the crank arm (and possible the crank axle).