Fridge works for 2 months if I unplug it for 2 hours
Side-by-side or top/bottom?

When this happens do you get high temp on refrigerator, freezer or both?

Some side-by-side refrigerators have a vent between the two sections which can ice up - in which case my guess is you would see different effects on each side. A couple of hours might be enough for that to melt and then everything works fine for a while.