Whirlpool Refrigerator sometimes does not stay cold

My unit will quit cooling on occasion. It will restart if I reset the thermostat or turn it off and back on then it operate normally for days and then shut down. I have replace the start relay and overload protector and still have the problem. What next? .
RLM