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
[SHIRO-668] Catch unexpected errors which can lead to oom #71
Conversation
Retest this please |
Refer to this link for build results (access rights to CI server needed): |
retest this please |
Refer to this link for build results (access rights to CI server needed): |
@bdemers have you any objection for this PR? |
We might want to take another look at this one, catching |
Sorry, I can't tell you what exception it was. I don't think it was logged. There were entries in the log every 5 minutes that the validation thread was running normally. Then the entries stopped and old sessions were no longer removed. So I didn't fix the reason for the expedition but built this workaround. |
May be we can use a |
If the problem is only a short disconnect from SessionStore/Cache, a simple reboot would be sufficient. However, if it is always the same session that triggers an error, the error would happen regularly but also be logged. With the help of log monitoring, the administrator can be informed about repeated errors. |
Thanks @cpetzka I can see that. Maybe we should catch Runtimes, and re-throw everything else. That would allow temporary exceptions like connection issues to be caught and logged (and the thread to continue), while other system errors to bubble up. @fpapon's idea for handling errors could be helpful too |
supercedes by #186 |
Unexpected errors in the "run" method of the validation ExecutorServiceSessionValidationScheduler can kill the validation thread an it will not be executed anymore (see StackOverflow.) This can lead to OOM's through too much sessions and can be a security risk by never ending sessions.
Catching "Throwable" is not the cleanest solution but it garant that the thread will be executed in the future.