Check the door switch.. Mine used to do that because the switch wore down and required a farther travel to realize the door is shut. It bearly makes contact (*usually your door is also sagging) and will intermittanly connect/disconnect. Just replace it..or short/dicsonnect (i cant remember if its NO or NC) it.
-Dz