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

ActionCable does not close its hijacked I/O socket #25613

Closed
tinco opened this issue Jun 30, 2016 · 1 comment
Closed

ActionCable does not close its hijacked I/O socket #25613

tinco opened this issue Jun 30, 2016 · 1 comment

Comments

@tinco
Copy link
Contributor

tinco commented Jun 30, 2016

Steps to reproduce

  1. Start a web server using Phusion Passenger that opens a websocket connection
  2. Refresh the page a few times

Expected behavior

There should never be more than 1 concurrent session when you run passenger-status. And when you close the website there should be 0.

Actual behavior

Sessions are leaked. The amount of open sessions will steadily increase.

System configuration

Rails version: Rails 5.0.0rc2 (and probably 5.0.0 too, so sorry I didn't know you guys were gonna release tonight)

Ruby version: 2.3

Hey guys sorry I was doing some performance testing using Phusion Passenger today, and I found this bug. I assume it's in Puma as well though I don't know how to make Puma give that info. I'll follow up with a PR.

Some extra info:

According to the Rack spec it is the applications responsibility to close the hijacked I/O socket after its done. This should likely be done in ActionCable::Connection::Stream#clean_hijacked_io.

@maclover7
Copy link
Contributor

Closing in favor of #25615.

tinco added a commit to tinco/rails that referenced this issue Jul 1, 2016
matthewd added a commit that referenced this issue Jul 1, 2016
close hijacked i/o socket after use (fixes #25613)
rafaelfranca pushed a commit that referenced this issue Jul 1, 2016
close hijacked i/o socket after use (fixes #25613)
drampelt pushed a commit to chalkdotcom/rails that referenced this issue Sep 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants