Fridge stops working

My side by side whirpool stops working and everything melts. If I restart the unit then it will work fine for a short while until it stops again. When its on, the fan works and it does get cold. Please help!