-
Notifications
You must be signed in to change notification settings - Fork 2k
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
What is the preferred way to reconnect a client to a silo host? #7436
Comments
Are you using static clustering like in your example? Do you have only one silo in your cluster? If yes, it could explain why you see issues when the silo goes down then up again |
Yes and yes. Currently, I only have one silo (In the future, there are 2 or 3 planned). Is there anything I can change in the current setup despite adding a second silo for now? |
Static clustering isn't very robust when you have a silo restarting. I strongly suggest using a clustering provider like Azure Table (Maybe ADO since you are using a SQL server for grain persistence ?). Even with one silo, your client will reconnect much faster once the silo is back up. And of course, two silos would be better :) |
Ok, I will try that. We use PostgreSQL, not SQL server, but the ADO provider is basically "the same", I guess.
Ok, thanks. I will close the issue now and re-open it, if more questions occur. Thank you for the quick answer :) |
I have the following debugging setup:
Runtime: Net6.0
Database: PostgreSQL 13 with TimeScaleDB enabled
OS: Windows 10
The original setup is a bit different (No idea if relevant):
Service: Net6.0 in Docker as background service (Worker template), Debian.
SiloHost: Runs as Linux service under CentOS Linux release 8.2.2004, but plain, not in Docker.
Database: PostgreSQL 12 with TimeScaleDB enabled on CentOS Linux release 8.2.2004.
Database and SiloHost on the same machine.
Hints for the database setup:
Afterwards, run the Orleans database scripts from:
The problem I face (See example project under https://github.com/SeppPenner/OrleansReconnection), is that the Orleans client doesn't reconnect properly. I will eleborate this a bit more:
GrainTypeResolver for the grain xy not found
.ExecuteAsync
in theExampleService
class in the example project.OrleansClient.Close()
beforeOrleansClient.Connect()
orOrleansClient.Dispose()
beforeOrleansClient.Connect()
). Nothing worked, always some error was thrown (Either an error that the client is already initialized or that the grain couldn't be reached because the client was re-initialized).As far as I understand the docs under https://dotnet.github.io/orleans/docs/host/client.html, reconnection shouldn't be added manually as it should work by default. Is that correct?
Back to the example project:
So, the final questions:
GrainTypeResolver
error?The text was updated successfully, but these errors were encountered: