Whirlpool side by side powers of then restarts

Our refrigerator in the last several weeks has completely shut off. It like it has been unplugged. After about 30 seconds it will come back on. The control panel is in the ice and water dispenser in the door. When the power is coming back on, most times it flickers several times before it comes back on and stays on. Everything stays cold, but I’m afraid that it may not comeback on one day. What would cause this?