Socket-io and nginx

I upgraded my test env to V6. All works well, except for websockets/socket-io

In my browser console, I get a repeating stream of errors: 404 (NOT FOUND)

I did a bench setup nginx to regenerate the nginx config. That put the suspiciously short config:

server_names_hash_bucket_size 64;

upstream frappe {
    server fail_timeout=0;

upstream socketio-server {
    server fail_timeout=0;

in frappe-bench/conf/nginx.conf

nginx.conf doesn’t seem to have a handler to forward / to localhost:3000

I found very little supporting docs about upgrading to v6, especially with regard to installing/setup of socket-io.

Any guidance welcome.


Hi Jev,

Such a short config for nginx is strange indeed. Do you have a multi-site setup?

Try running:

bench use {sitename}
bench setup production


Sorry for no response. I have been on vacation. I will investigate further later this week and let you know.

I think I know what’s wrong,


bench use {sitename}
bench config serve_default_site on
bench setup nginx

Check if nginx is right.

Don’t run setup production! :smile:

I finally got around to upgrading my production instance today.

The issues was that config.json did not contain "serve_default_site": true,.

After adding that, the nginx config is generated correctly. Thanks!

1 Like