Socket keeps disconnecting and reconnecting again

I use Phoenix Socket JS library inside a Vue based application. Socket gets connected and channel joined but after couple of seconds it gets disconnected and the socket connects again automatically.

I see this JS error (console message):

transport: close CloseEvent {isTrusted: true, wasClean: true, code: 1000, reason: "", type: "close", …}

I use Nginx to proxy the connections to Phoenix.

What logs do you see on the server?

1 Like

In the server I see only reconnections, no errors.

Sorry I should have been clearer, can you provide server logs?

Seems it was due to bad configuration or outdated library. Now works fine, thank you.

1 Like