Skip to content
This repository has been archived by the owner. It is now read-only.

help with server-side disconnects in slack-ruby-client #187

Open
dblock opened this Issue Jun 29, 2018 · 6 comments

Comments

Projects
None yet
3 participants
@dblock
Copy link

dblock commented Jun 29, 2018

Coming from slack-ruby/slack-ruby-client#208. The celluloid-io code we have isn't detecting server-side disconnects occasionally. We could really use some professional help, we're likely not using celluloid-io correctly in https://github.com/slack-ruby/slack-ruby-client/blob/master/lib/slack/real_time/concurrency/celluloid.rb#L31

@tarcieri

This comment has been minimized.

Copy link
Member

tarcieri commented Jun 29, 2018

@dblock Celluloid::IO is effectively unmaintained. I would suggest switching to async:

https://github.com/socketry/async

@dblock

This comment has been minimized.

Copy link
Author

dblock commented Jun 29, 2018

I opened slack-ruby/slack-ruby-client#210 maybe someone will contribute. Still, celluloid serves us well rn and I'd like to fix the issue as well.

@ioquatix

This comment has been minimized.

Copy link
Contributor

ioquatix commented Jun 29, 2018

@ioquatix

This comment has been minimized.

Copy link
Contributor

ioquatix commented Jun 29, 2018

Sorry, not trying to spam, just trying to help with other suggestions :)

@dblock

This comment has been minimized.

Copy link
Author

dblock commented Aug 19, 2018

This is still an ongoing problem, so I could still use some help. What I am seeing is that the run loop still sits inside a read, but that the goes offline.

Debugging messages that are being sent back and forth, next. @tarcieri When you have a second, would you be so kind to share any better logging code that I can add inside the read that would be helpful? Currently I do:

def handle_read(buffer)
  logger.debug("#{self.class}##{__method__}") { buffer }
  driver.parse buffer
end

This produces

D, [2018-08-19T14:27:35.200204 #212] DEBUG -- Slack::RealTime::Concurrency::Celluloid::Socket#handle_read: ?
D, [2018-08-19T14:27:35.200330 #212] DEBUG -- Slack::RealTime::Concurrency::Celluloid::Socket#write: ???6?

Not very useful. I could convert that data to some binary, but that's probably not much better. Maybe there's a parser I should add logging to? Any other recommendations?

I tried setting a global celluloid logger and not seeing anything from celluloid-io.

Celluloid.logger = ...
Celluloid.logger.level = Logger::DEBUG

Thanks.

@dblock

This comment has been minimized.

Copy link
Author

dblock commented Aug 19, 2018

Also, is there another driver than https://github.com/faye/websocket-driver-ruby that we should/could be using?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.