My ps3 will, once in a blue moon, shut itself down while playing a game and will have the red light flashing. It turns back on with no problems. The fan does get really loud too. Is it overheating or is my system just a piece of crap. Its only been used for 3 weeks.
Make sure you leave at least 15cm of space for your PS3 to breathe and let out all of it's hot air. It's bound to overheat if you don't.
Which model do you have? If it is one of the older models and is out of warrenty I would recommend opening it up and cleaning out any dust that might have built up in there and maybe buying some Arctic Silver and apply it to the CPU and GPU just to make sure. There are tutorials on youtube how to do this, look for gilksy.