[SOLVED] PC restarting and red beeps

I have a hp z230 core i5 4th gen with a Rx 570 and 4 4gb Rams. I use it for gaming primarily. During some games, it restarts automatically. This kept happening to me for last 3-4 days. It restarted as usual today as well but this time its power button started beeping while flashing red light. I didn't count number of beeps i think it was 3 or 4 times. What could be it's problem? Any solution?
 
Last edited: