-
Notifications
You must be signed in to change notification settings - Fork 43
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
Retries cause OOM when creating stacktrace #24
Comments
And if you don't run in an OOM, you will sooner or later run in an StackOverflowException. |
Yes, switching to async would certainly solve the issue. I am not sure if this issue is really relevant for most users; the core problem is "sync" resending, which might be an edge case. The way we are currently using the lib requires sync (re-)sending; so for the moment we are going forward with the modified MessageProcessor. So maybe you don't need to "fix" anything; possibly document the problem w.r.t. ImmediateResender (or even deprecate it). |
Well, I don't think it requires a persistence. If there is an async message processor it simply avoids stacking the stacktraces but it also does not throw the exceptions directly. You may wanna have a look at the |
I'll play with it next week. Just from reading there seem to be a few problems:
In my mind pushing mutable object (aMsg, aOptions) to another thread and returning early is questionable; for example calling |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This is similar to #16; the scenario is repeated failure to send a message.
The final exception isn't too interesting; but anyway:
The problem seems to be the recursive chain of calls:
AS2SenderModule -> DefaultMessageProcessor -> ResenderModule -> DefaultMessageProcessor -> AS2SenderModule -> ...
.Each time the exception is caught in AS2SenderModule, wrapped, stashed and rethrown if the next attempt (
doResend
) fails again; then caught again inDefaultMessageProcessor
and rethrown as a ProcessorException.This is the length of
getStackAsString()
inProcessorException::_getMessage
:I don't see a "good" way to avoid the geometric increase; for our usage the following works, but aborting early might not be correct in the general case.
The text was updated successfully, but these errors were encountered: