When a refrigerator stops cooling, it's never a pleasant experience. Spoiled food can be worth hundreds of dollars and melted ice cream is no fun.
To keep your fridge cooling efficiently, don't block the vents with food, don't keep the doors open too long and make sure they close tight. Keep the temperature setting on the middle number. Set your fridge to 'humid' or turn the power saver option OFF if you do a lot of steamy cooking. Surge protectors can prevent an expensive repair on a computerized fridge.
The temperature sensor may give a false reading and turn the cooling off early. The fan may not work. The sealed system that circulates refrigerant in your fridge can be at fault. The defrost system may not work properly and ice buildup behind the rear wall will restrict cold airflow in the fridge causing warm temperatures in the fridge and freezer.
Ice buildup can plug the defrost drain and cause your fridge to leak water inside the fridge or form an ice sheet on the freezer floor and cause poor cooling. The evaporator area will need to be manually defrosted and the drain cleaned out. Some manufacturers recommend newly redesigned drain tubes which should replace the old style ones to prevent reoccuring problems.