# Error when proxying websocket connection over unix socket

**URL:** <https://www.ruby-forum.com/t/error-when-proxying-websocket-connection-over-unix-socket/227751>\
**Category:** NGINX\
**Created:** [March 27, 2013, 6:21pm UTC](https://www.ruby-forum.com/t/error-when-proxying-websocket-connection-over-unix-socket/227751 "2013-03-27T18:21:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![David.Neumann](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/59ef9b/32.png) [@David.Neumann](https://www.ruby-forum.com/u/David.Neumann)\
**Post date:** [March 27, 2013, 6:21pm UTC](https://www.ruby-forum.com/t/error-when-proxying-websocket-connection-over-unix-socket/227751/1 "2013-03-27T18:21:51Z")

</div>

Hello everybody,

I found that if you try to proxy a websocket connection over a unix  
socket  
you get an error.  
This is due to the fact that nginx tries to set TCP\_NODELAY for the unix  
socket in  
ngx\_http\_upstream\_upgrade  
in line 2436

This probably should not be done for unix sockets.

Best Regards

David

Posted at Nginx Forum:

> **[Error when proxying websocket connection over unix socket](https://forum.nginx.org/read.php?2,237839,237839#msg-237839)**
>
> Hello everybody, I found that if you try to proxy a websocket connection over a unix socket you get an error. This is due to the fact that nginx tries to set TCP\_NODELAY for the unix socket in ngx\_http\_upstream\_upgrade in line 2436 This probably sho

---

<div class="post-metadata">

**Author:** ![David.Neumann](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/59ef9b/32.png) [@David.Neumann](https://www.ruby-forum.com/u/David.Neumann)\
**Post date:** [March 27, 2013, 6:50pm UTC](https://www.ruby-forum.com/t/error-when-proxying-websocket-connection-over-unix-socket/227751/2 "2013-03-27T18:50:29Z")

</div>

On Wed, Mar 27, 2013 at 01:21:06PM -0400, David.Neumann wrote:

> Hello everybody,
> 
> I found that if you try to proxy a websocket connection over a unix socket  
> you get an error.  
> This is due to the fact that nginx tries to set TCP\_NODELAY for the unix  
> socket in  
> ngx\_http\_upstream\_upgrade  
> in line 2436
> 
> This probably should not be done for unix sockets.

You’re too late with your report:

[https://trac.nginx.org/nginx/changeset/5143/nginx](https://trac.nginx.org/nginx/changeset/5143/nginx)

🙂
