my laptop keeps shutting off every now and again

my sony vaio keeps shutting off ineplicably either after 45 minutes or 3 hours of running normally what could be wrong with it.

Not an expert, but I would guess overheating. They do get clogged with dust and all it may need is a good clean.

Read this

Here’s a list of what could be wrong, but most likely it’s the fan.

Software

  • Power settings could be set to shut it off after set time.
  • Some crap like spyware, malware, etc has corrupted your file system

Hardware

  • Your fan is blocked by dust - use an can of compressed air and blow it in the side of your fan and get it out that way, here you can see a video that explains how to, but use this method of cleaning (forget that straw and buy an can of compressed air).
  • Faulty RAM - run a RAM test guide1guide 2
  • Faulty HDD - either file system got corrupted of some sectors of your HDD developed a fault and your getting read/write errors