-
Notifications
You must be signed in to change notification settings - Fork 267
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
multiple daphne processes with supervisord and UNIX socket #287
Comments
Hi. There's not much to go on here, and I don't have an instant answer I'm afraid. Are you able to dig in a little to see what might be going on? |
I get exactly the same problem. After differents tests, when I use the same setup:
nginx:
supervisord:
It's work great.
nginx:
supervisord:
But when I passed to UNIX sock I get trouble... Nginx can't talk to my daphne server via this socket.... nginx error log:
NB: everything runned by |
I get exactly the same problem. It is very easy to reproduce, see the steps below. Unfortunately, I have no more time to dig the root cause. Steps to reproduce
Actual resultIn the second terminal:
In the first terminal:
Expected resultIn the second terminal:
In the first terminal:
BTW, uvicorn works fine. To check it just repeat the steps, but before building the Docker image replace
|
I'm also facing this issue. supervisord + daphne + apache. |
FYI, also seeing this at channels==2.4.0, daphne==2.5.0. (I'll just switch to TCP instead...) |
I've tried TCP and unix sockets, and i can get normal http being proxied to daphne using nginx (with an ssl layer), but websocket connections disconnect after the initial handshake. (ie i can see a normal django site views). @JanMalte's original issue talked of the supervisord [fcgi-program] not working. The example given isn't the same as the Channels deployment doc linked (it may have changed):
https://channels.readthedocs.io/en/latest/deploying.html#nginx-supervisor-ubuntu has
ie the The other commenters appear to be missing the same variable for making a difference between process (names). Still - doesn't help my websockets being dropped. Thought i'd chip this in, in case it helps anyone. |
I finally fixed my websocket connection. I discovered Ubuntu18.04 standard apt repositories provide redis v4, and Channels Redis requires >=v5. |
Hi @stephendwolff - Glad you solved it. For note, Redis only supports the current and previous versions (so currently 6 and 5). Anything older than that is EOL. So it’s important to always keep up. (Will add something to that effect to the docs.) |
@carltongibson thanks - it is in the Channels Redis docs, but i hadn't thought to look there until i got logging fully working and found where thing broke! The Redis docs recommend installing from source, which i hadn't done, as i was using Ansible for deployment and it was easier just to use apt. |
Similar to what @stephendwolff proposed, I've solved the problem updating my Redis server and dependencies. My final versions are:
|
@JanMalte were you able to find a solution to this problem? Same question for @TheKalpit and @rrauenza. The original problem remains unsolved as far as I get it. |
Not as far as I can remember. |
OK, this really doesn't look like a Daphne issue per se. As face value, it would be a lower level twisted issue (perhaps) but folks seems to be resolving with supervisor config changes or updating. I'm going to close as stale/resolved. If you hit this issue again, please open a fresh thread, linking back here, with a reproduce. |
Setup
daphne
withsupervisord
andnginx
as shown in the docs is working.https://channels.readthedocs.io/en/latest/deploying.html#nginx-supervisor-ubuntu
But changing from TCP to UNIX socket for the
fcgi
process group results indaphne
not responding to requests.Run as single program in supervisor
Request
Run as fcgi-program in supervisor
Request
The text was updated successfully, but these errors were encountered: