In Google App Engine, running on Java 8 we are seeing frontend requests to servlets fail with:
java.lang.OutOfMemoryError: GC overhead limit exceeded
But the stack trace for that error is unrelated to the servlet - instead it's throwing from a background deferred task's run()
method.
Those tasks get executed by the deferred task servlet usually, and certainly not by the servlet where we're seeing the 500 error.
I'm scratching my head on this one and wondering, if a particular instance was serving both a deferred task, and that front end servlet request, and it crashed with that GC error above, could it take out the servlet thread (and presumably other threads on the same instance) so that they all fail with the same memory exception?
So my question is: Would the isolation of threads on an instance Google App Engine Java 8 environment allow for a memory error in one thread to crash all threads in that same instance, and if so would the strack trace in all threads be the same?
Update: Looking at the logs for the specific instance ID where this happened around the same timing, I see a massive number of other examples of the same stack trace, all in different users, and different frontend servlets, so it seems to support the theory that the whole instance was broken and the stack trace we're seeing is somehow crossing over from a different thread on the same instance.