Broken Spa Heater

I have a MiniMax Pool and Spa Heater (Purex Pool Equipment) that is about 10 years old. We seldom heat the pool, but do periodically use it on the spa. However, it is no longer working correctly.
When turned on, it will heat for about 10 minutes and then shut off. If I wait a few minutes, it will start to heat, then shut off.
How can I tell whether there is a problem with the thermostat or one of the safety valves (water or gas pressure, internal overheating)?

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
Add image file
Upload is a website for homeowners and building and maintenance pros. It is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.