Websocket changes in 21.03.0

Has anything changed in 21.03.0 regarding how websocket connections are handled?

With 21.03.0, subscriptions (over wss) have stopped working for us. It seems that the subscription request arrives successfully at dgraph but is closed almost immediately:

I0503 15:16:10.659605      15 poller.go:131] Subscription polling is started for the ID 5
I0503 15:16:10.677101      15 poller.go:272] Terminating subscription for the subscription ID 5

Our setup is the following:
client <-- https/wss --> haproxy <-- http/ws --> dgraph
The exact same setup is working fine with dgraph 20.11.3.

Help is very much appreciated. We are a bit clueless here.

1 Like

Ping @graphql @hardik

2 Likes

Hi @maaft, have you tested locally? For me, it’s working on 21.03.

Yes, locally its working.

But not when haproxy and dgraph are hosted remotely. And as I said, the same setup works with 20.11.3 - hence my question if anything has changed.

1 Like

We are looking into it. Subscription is terminating as seen in logs that can happen.
1.If you change the schema
2. If the client disconnects, or maybe some connection issue.
Make sure it’s not the case.

In 20.11.3 the exact same setup is working. I can only repeat that. Nothing changed, except dgraph versions.

@JatinDevDG have you found the time to see if there were any changes?

1 Like

yeah, there were some changes in subscriptions like we added multitenancy. And also we added encryption for subscriptions. But those shouldn’t result in subscription termination.
If you can provide some more details then it will be helpful for us to debug it.

  1. How you are migrating to 21.03, are you using same p,w,z directories and running new binary or your are export and then importing data.(or taking backup and then restoring)

  2. Can you share zero and alpha v3 logs. We can get some more info from there.

Sorry for the fuss - we solved it. We still not know why it worked in the previous version though.

After reviewing our haproxy configuration and routing the direct TCP traffic (instead of upgrading to SSL manually) the issue disappears. Closing this.