-
Notifications
You must be signed in to change notification settings - Fork 628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Process not terminated on OOM error #1258
Comments
It's not clear what you expect the framework to do in this case. |
I guess it cannot recover from this exception? I would just expect that my app exits. Is this something that is missing from my (mis)configuration of spring framework or? |
OOM errors are hard to deal with; generally the JVM needs to be restarted; with the |
This is from javadoc:
The problem I had is that I did not know that my application was in some partially working state, since It did not stop, but it did not work either how it should. |
Resolves spring-projects#1258 (comment) **I will backport to 2.2.x with a no-op default**
Resolves spring-projects#1258 (comment) **I will backport to 2.2.x with a no-op default**
Resolves #1258 (comment) **I will backport to 2.2.x with a no-op default**
Resolves #1258 (comment) **Backported to 2.2.x with a no-op default**
Thanks. So by default (I do not need to configure anything?) - Direct and Simple listeners will exit the app on OOM? |
btw. this fixes my problem, so thanks for that, but shouldn't you implement handler for all |
Correct in the upcoming 2.3 release; with the 2.2.12 backport, the default behavior is do nothing (backwards compatibility); you have to set your own OOMHandler. I suppose we could open it up to all errors, but, TBH, I don't think I have ever seen any of those errors in over 20 years working with Java. @artembilan WDYT? |
I don't think that we need care about those errors at the moment. |
I just pasted those from javadocs, but I guess there are other common errors like - |
Stack overflow is not fatal; you can recover from it (unlike OOM). It would be wrong to kill the JVM. |
I guess this SO post has a good explanation about that: https://stackoverflow.com/a/52115695/4882336 |
OK; convinced... |
Resolves spring-projects#1258 Call the handler for all `Error`s on container threads. **I will do the cherry-pick; there will be conflicts**
Resolves #1258 Call the handler for all `Error`s on container threads. **I will do the cherry-pick; there will be conflicts**
Resolves #1258 Call the handler for all `Error`s on container threads. **I will do the cherry-pick; there will be conflicts**
Thanx. Seems like more robust solution. |
How come this happened - that is - is this expected behavior? My application was not terminated and started working pretty strange - seems like it could not recover from this java.lang.OutOfMemoryError - but still, spring did not terminate the APP but it continue to run.
The text was updated successfully, but these errors were encountered: