If you are getting this error there have been lots of suggested fixes. I have tried loads of them without any luck but a recurring theme throughout many of the posts online was that it could be a plugin.

In my case it was, of all things, Jetpack!! So do yourself a favour, try disabling that before trying any of the more complex fixes (like a complete reinstall!)