If it turns off after a few minutes then....
The thermal cut out is operating prematurely
or
The filters are very badly blocked
or
Somebody has been tugging hard at the cord and the wires are broken inside the cable - an easy fix - cut some cord off and fit a new plug. Test for this by wriggling the cable near the plug.
E-bay shows a thermal cut out for £8 and Amazon shows a new motor for about £19 but there are two types of motor for the DC04
http://dysonmedic.co.uk/replace-dyson-dc04-motor-ametek-ydk/
Dysonmedic.com is a good site with words and pictures
http://dysonmedic.com/DC04%20Folder/DC04%20page.html
It warns against cheap Chinese motors (£20) and suggests that Manchester Vacs is a good source for spares.
Good luck...
Peccavi
June 2013