Menu

How to Fix Dropped Odoo and WSS WebSocket Connections in Nginx
📰

How to Fix Dropped Odoo and WSS WebSocket Connections in Nginx

DEV Community: webdev·Chathura Rathnayaka·7 days ago
#I6ZszVxM
Long article (334 words) — no AI summary yet.
Reading 0:00
15s threshold

If Odoo live chat, discuss notifications, or bus polling keep disconnecting behind an Nginx reverse proxy, two config mistakes are usually responsible:

Routing /websocket to Odoo's main HTTP port ( 8069 ) instead of its evented gevent port ( 8072 ).

Leaving Nginx's default proxy_read_timeout at 60 seconds without HTTP/1.1 upgrade headers.

The Broken Pattern

A standard reverse proxy block forwards everything to 8069 over HTTP/1.0 and drops idle WebSocket connections every minute:

location / { proxy_pass [ http : //127.0.0.1:8069](http://127.0.0.1:8069); }

Enter fullscreen mode

Exit fullscreen mode

Working Nginx Config for Odoo 16/17+ WebSockets

Define a $connection_upgrade map in your http block so standard HTTP requests keep working alongside WebSocket upgrades:

map $ http_upgrade $ connection_upgrade { default upgrade ; '' close ; }

server { listen 443 ssl http2 ; server_name erp . example .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.