The manual says the heat sink is too hot or an unacceptable DC voltage was sensed going out.http://www.retrevo.com/support/Yamaha-P4500-Amps-manual/id/962bh144/t/2/
Generally speaking, an amp attempts to protect itself from heat, shorts, overloads and operator exuberance by refusing to turn on or stay on; or it may turn on but produce no audio to the speakers.
Overloads can be from excessive periods of high output or marginally low impedance loading by the speakers; and shorts would be wiring issues or a speaker blowing up.
You should be able to feel if it's hot. WHY is it overheating? Make sure it has sufficient ventilation on all sides and that vent holes are not blocked by dust balls. Ensure the fan (if equipped) is running as designed (some only operate on demand). Clean dust and debris from it.
If the amp comes back on after cooling, you're lucky. They only have so many self-protection cycles in their lives so continuously resetting or cycling their power without addressing the cause can do more harm than good.
If it protects immediately on a cool power up you should disconnect the speaker connections and try it 'nekkid'. If it comes up then diagnose which lead(s) are shorted. If it does not come up the problem is internal and should be left to an experienced and competent hands-on tech.
Check for loose speaker connections at the speaker as another possible root cause for intermittent shutdown.