If the fan is not running or may be noisy just oil the fan and it will work fine.
In most cases when a machine keeps restarting and if you torch at the back of the machine near the power supply and it hot check the power supply fan.
Check this out on how to oil the fans.
articles.techrepublic.com.com/5100-1035_11-5034842.html