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

=sbt Do retry connection in Player. #549

Merged
merged 1 commit into from
Aug 8, 2023
Merged

Conversation

He-Pin
Copy link
Member

@He-Pin He-Pin commented Aug 8, 2023

refs: #547
and
refs: apache/pekko-http#297

private def tryConnectToController(): Unit = {
Try(reconnect()) match {
case Success(r) => connectionRef.set(r)
case Failure(ex) =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth it to use exponential backoff here or is that excessive?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reconnect-backoff = 1s which is used in the reconnect()

@He-Pin
Copy link
Member Author

He-Pin commented Aug 8, 2023

[info] [JVM-2-MultiDcLastNodeMultiJvmNode2] [ERROR] [08/08/2023 10:05:01.021] [MultiDcLastNode-pekko.actor.default-dispatcher-6] [PlayerHandler(pekko://MultiDcLastNode)] Error when try to connect to remote addr:[localhost/127.0.0.1:4711] will retry, time left:[-4301592 nanoseconds], cause:[Connection refused: localhost/127.0.0.1:4711].
[info] [JVM-2-MultiDcLastNodeMultiJvmNode2] [ERROR] [08/08/2023 10:05:01.048] [MultiDcLastNode-pekko.actor.default-dispatcher-18] [PlayerHandler(pekko://MultiDcLastNode)] Error when try to connect to remote addr:[localhost/127.0.0.1:4711] will retry, time left:[980216623 nanoseconds], cause:[Connection refused: localhost/127.0.0.1:4711].

I tested it on my box, works as expected.

Copy link
Contributor

@mdedetrich mdedetrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@He-Pin He-Pin merged commit 262d485 into apache:main Aug 8, 2023
16 of 17 checks passed
@He-Pin He-Pin deleted the asyncConnect branch August 8, 2023 11:21
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

Successfully merging this pull request may close these issues.

2 participants