Skip to content
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

Unexpected SessionLockLostExceptions during processing 2 different sessions #43

Closed
alrod opened this issue Jan 4, 2020 · 3 comments
Closed

Comments

@alrod
Copy link
Member

alrod commented Jan 4, 2020

I'm working with a simple setup where I have AutoComplete = false and I complete the messages myself, which works as attended for the most part.
I regularly experience SessionLockLostExceptions though, even in the most basic setup where there is plenty of session-lock-time left. With a little digging I found out that my function instances quite often are injected with the wrong IMessageSession objects. I can easily tell, because the Msg.SessionId is different from the messageSession.SessionId.
It seems that the following scenario takes place:
Two messages in two different sessions are on the subscription that my function subscribes to. Then my function is triggered twice, almost simultaneously, and both sessions are correctly locked, but both function instances are injected with the same messageSession. Then when I try to complete a message with the wrong messageSession, it of course fails, but it surfaces as a SessionLockLostException, which is possibly what a lot of the others in this thread are encountering.

Copied from:
#16 (comment)

@alrod
Copy link
Member Author

alrod commented Jan 4, 2020

@alrod
Copy link
Member Author

alrod commented Jan 4, 2020

Closed as duplicate #23

@alrod alrod closed this as completed Jan 4, 2020
@buyckkdelaware
Copy link

@alrod
It looks ok from the first tests on my side. But I did notice other cases of SessionLockLostExceptions, but they don't look related to this particular issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants