-
Notifications
You must be signed in to change notification settings - Fork 291
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
nchan_publisher_upstream_request without proxy_pass = crashes #588
Comments
I'm aware of this isssue, and there's no good way around it without seriously mucking around with Nginx internals. I'm currently focused on Nchan 2, and because there is an acceptable workaround, I'm not really willing to spend time fixing this. For now, please use proxy_pass, annoying as it may be. This issue will be addressed in Nchan 2. |
Thanks for the info! Unfortunately, I've managed to get (very intermittent) segfaults using I'll do some more testing later and try to find a simple reproducible config scenario. The scenario I was going to post stopped being reproducible (after some nginx restarts) as I was writing this... For reference, I'm using nchan v1.2.7 from the 2020-03-17 release with nginx/1.19.3. |
This unfortunately seems to be broken still. Segfault about 10% of the time on websocket disconnect... and then everything is broken. |
Adding a
nchan_publisher_upstream_request
directive pointed to a location without aproxy_pass
directive leads to unpredictable behavior of nchan. For example, consider this configuration:On the client side, I run:
I expect the message to simply be echoed since nchan should be getting a 304 upstream response, instead 1 of 4 things happen (seems to depend on the length of the sent string):
[alert] 11246#11246: worker process 11700 exited on signal 11
ker process: nchan-1.2.7/src/subscribers/websocket.c:575: websocket_publish_upstream_handler: Assertion 'd->subrequest' failed.
"What I'm actually trying to do is pass the message upstream to PHP via
fastcgi_pass
(e.g.fastcgi_pass
directive in my/reply
location). Doing this leads to the behavior above.The roundabout way of
proxy_pass
ing the request to myself works fine. E.g. this works:This, however causes unwanted access logging and, probably, performance degradation when I'll have many messages being published.
So is what I'm trying to do simply unsupported and my only choice is to use the roundabout way of
proxy_pass
ing messages back to my own server, or am I just doing something wrong?Thanks for any advice on this.
The text was updated successfully, but these errors were encountered: