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

There should be a way to cancel WebSocket connections upon restart #1200

Closed
FooBarWidget opened this Issue May 30, 2014 · 10 comments

Comments

Projects
None yet
3 participants
@FooBarWidget
Member

FooBarWidget commented May 30, 2014

Currently, WebSocket connections are not aborted on a restart. This prevents the process from properly restarting because we first wait for all connections to terminate. We solve this for Meteor by terminating Meteor with SIGTERM but we can't do this with Ruby and Node.js, where not all requests are WebSocket/long-polling requests.

I suggest the following solution:

[ ] Upon restarting a process, have RequestHandler terminate all WebSocket-upgraded connections.
[ ] Introduce a header, "Passenger-Persistent-Connection: true", and let apps set this header for long polling requests. RequestHandler should terminate all these connections too.

@allaire

This comment has been minimized.

Show comment
Hide comment
@allaire

allaire Sep 2, 2014

Hey @FooBarWidget, I came from this post in the mailing list: https://groups.google.com/forum/#!topic/phusion-passenger/vWxWI-iqH1w

I saw this was milestone as 4.0.49 beta 1, is this release yet?(since stable is now on 4.0.50)

We run a big meteor app, with many users, and deploying our app currently involves 1 minute hang and can potentially breaks the hanging method call.

allaire commented Sep 2, 2014

Hey @FooBarWidget, I came from this post in the mailing list: https://groups.google.com/forum/#!topic/phusion-passenger/vWxWI-iqH1w

I saw this was milestone as 4.0.49 beta 1, is this release yet?(since stable is now on 4.0.50)

We run a big meteor app, with many users, and deploying our app currently involves 1 minute hang and can potentially breaks the hanging method call.

@FooBarWidget

This comment has been minimized.

Show comment
Hide comment
@FooBarWidget

FooBarWidget Sep 2, 2014

Member

It isn't released yet. It's planned for 5.0.0, which we are actively working on and hope to release within 2 months. But seeing so many user requests, we might introduce a workaround in earlier versions.

Member

FooBarWidget commented Sep 2, 2014

It isn't released yet. It's planned for 5.0.0, which we are actively working on and hope to release within 2 months. But seeing so many user requests, we might introduce a workaround in earlier versions.

@allaire

This comment has been minimized.

Show comment
Hide comment
@allaire

allaire Sep 2, 2014

@FooBarWidget Thanks for the update. If you can keep us in the loop on this issue when something is implemented, that would be rad!

allaire commented Sep 2, 2014

@FooBarWidget Thanks for the update. If you can keep us in the loop on this issue when something is implemented, that would be rad!

@FooBarWidget

This comment has been minimized.

Show comment
Hide comment
@FooBarWidget

FooBarWidget Sep 2, 2014

Member

Please subscribe to this issue. I will post any updates here.

Member

FooBarWidget commented Sep 2, 2014

Please subscribe to this issue. I will post any updates here.

@allaire

This comment has been minimized.

Show comment
Hide comment
@allaire

allaire Sep 2, 2014

Done, thanks!

allaire commented Sep 2, 2014

Done, thanks!

@jonathanhoskin

This comment has been minimized.

Show comment
Hide comment
@jonathanhoskin

jonathanhoskin Sep 7, 2014

We are also experiencing this problem. Have subscribed, will wait for updates.

jonathanhoskin commented Sep 7, 2014

We are also experiencing this problem. Have subscribed, will wait for updates.

@FooBarWidget FooBarWidget modified the milestones: 4.0.51, 5.0.0 beta 1 Sep 15, 2014

@FooBarWidget

This comment has been minimized.

Show comment
Hide comment
@FooBarWidget
Member

FooBarWidget commented Sep 15, 2014

I've implemented a temporary solution until 5.0 is out. Please read https://github.com/phusion/passenger/wiki/Phusion-Passenger:-Node.js-tutorial#restarting_apps_that_serve_long_running_connections for more information.

@allaire

This comment has been minimized.

Show comment
Hide comment
@allaire

allaire Sep 16, 2014

Thanks @FooBarWidget ! Keep us posted when 4.0.51 is out :)

allaire commented Sep 16, 2014

Thanks @FooBarWidget ! Keep us posted when 4.0.51 is out :)

@FooBarWidget

This comment has been minimized.

Show comment
Hide comment
@FooBarWidget

FooBarWidget Sep 16, 2014

Member

Please keep an eye on blog.phusion.nl. We announce releases there. :)

Member

FooBarWidget commented Sep 16, 2014

Please keep an eye on blog.phusion.nl. We announce releases there. :)

@allaire

This comment has been minimized.

Show comment
Hide comment
@allaire

allaire Sep 16, 2014

Subscribed!

allaire commented Sep 16, 2014

Subscribed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment