Skip to content

Check rabbitmq connection status and reconnect when disconnected#55

Draft
film42 wants to merge 1 commit intomasterfrom
gt/connection_check_status
Draft

Check rabbitmq connection status and reconnect when disconnected#55
film42 wants to merge 1 commit intomasterfrom
gt/connection_check_status

Conversation

@film42
Copy link
Copy Markdown
Contributor

@film42 film42 commented Aug 24, 2021

The underlying client should be good about reconnecting, but we are
seeing behavior where a runtime (in this case JRuby) is using a lot of
mem and then fails to disconnect despite every other connection
(thousands of others) working just fine. Perhaps it's safer to reconnect
and let the publishers figure it out?

Right now we see:

com.rabbitmq.client.AlreadyClosedException: connection is already closed due to connection error; cause: java.io.EOFException

This is called when the in-mem publisher tries to create a new channel
(when a consumer thread is created).

TODO: Will this potentially leak a connection? Should we explicitly
disconnect the old connection?

The underlying client should be good about reconnecting, but we are
seeing behavior where a runtime (in this case JRuby) is using a lot of
mem and then fails to disconnect despite every other connection
(thousands of others) working just fine. Perhaps it's safer to reconnect
and let the publishers figure it out?

Right now we see:

```
com.rabbitmq.client.AlreadyClosedException: connection is already closed due to connection error; cause: java.io.EOFException
```

This is called when the in-mem publisher tries to create a new channel
(when a consumer thread is created).

TODO: Will this potentially leak a connection? Should we explicitly
disconnect the old connection?
@ETetzlaff
Copy link
Copy Markdown
Contributor

LGTM

@newellista
Copy link
Copy Markdown

I like it. :shipit:

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.

3 participants