In our case we experienced this while performing a load test on our app server. The issue turned out that we need to add additional memory to our JVM because it was running out. This resolved the issue.
Try increasing the memory available to the JVM and or monitor the memory usage when you get those errors.