I was having similar issues the past couple of days and contacted my hosting company. They diagnosed the problem this way:
“The error message above would explain the intermittent issues as it would occur when the shared memory limit is hit. I found that the sites where using php 7.1 which had op cache enabled. This would be the cause of the errors as op cache is very resource intensive and should not be used on your current VPS. I have gone ahead and removed op cache from the server to correct that issue, you should be all set.”