I'm running monit to monitor ram and swap usage and it didn't seem to be running out of memory:
Swap usage limit If greater than 25.0% then alert
Memory usage limit If greater than 75.0% then alert
I increased the php memory_limit to 256M, though I don't think it's related to the issue.
I'm still getting the error in the logs after the memory_limit change.