Disconnect WS on server shutdown

32 views
Skip to first unread message

Igor Partola

unread,
Feb 26, 2018, 12:55:15 PM2/26/18
to Django users
I am running into an issue with one of my applications that is running on Heroku. Basically during a deploy, the old daphne process gets shut down and a new one takes over. The problem with this is that some users are still connected to the old daphne process and are still members of various groups that get notifications via WS. This is problematic because it seems that the daphne server being shutdown does not right away get detected by the browsers.

Is there a way to close the WS connections from daphne when it receives the TERM signal?

Andrew Godwin

unread,
Feb 26, 2018, 1:09:02 PM2/26/18
to django...@googlegroups.com
At the moment there is not - you should follow this issue: https://github.com/django/daphne/issues/177

On Mon, Feb 26, 2018 at 9:37 AM, Igor Partola <ipar...@gmail.com> wrote:
I am running into an issue with one of my applications that is running on Heroku. Basically during a deploy, the old daphne process gets shut down and a new one takes over. The problem with this is that some users are still connected to the old daphne process and are still members of various groups that get notifications via WS. This is problematic because it seems that the daphne server being shutdown does not right away get detected by the browsers.

Is there a way to close the WS connections from daphne when it receives the TERM signal?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f0aecaae-6b98-4778-9d66-d2a09a449b71%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages