Mac behaving strangely when I close the lid
This started a few months ago...
I closed the lid on my Macbook, and went away and left it for more than an hour. When I came back I could hear that the fan was still whirring so it hadn't properly gone to sleep. So I opened the lid and the screen wouldn't come on for ages, and then it suddenly restarted itself. When it came back on it said that it had to restart because it encountered an error.
This is beginning to happen more and more often as time goes on. Does anybody know what it could be?
Specs:
macOS Sierra
MacBook Pro (Retina, 15-inch, Mid 2014)
2.2 GHz Intel Core i7
16 GB 1600 MHz DDR3
Macintosh HD
Intel Iris Pro 1536 MB
MacBook Pro (Retina, 15-inch, Mid 2014), macOS Sierra (10.12.6)