AngularStompDK icon indicating copy to clipboard operation
AngularStompDK copied to clipboard

If server goes down, AngularStompDK will automatically reconnect over a hundred times after it comes up at times

Open ghost opened this issue 8 years ago • 4 comments

Hello, If I put the server down to update it, when it comes back up, clients will keep connecting to it over and over. Sometimes it is over a hundred times per client that is only receiving & sending messages.

ghost avatar Feb 08 '17 20:02 ghost

I don't really understand the element you describe. Could you describe with a step by step and/or example ?

There is a Spring project with simple element. If I shutdown the server and start it again, all the subscription are working well...

davinkevin avatar Feb 11 '17 19:02 davinkevin

One user

That is all one user.

My JavaScript code doesn't detect disconnections nor try to reconnect.

When the server was down, AngularStompDK attempted to reconnect over a hundred times in 30 minutes, most of them in the first minute it seems.

This itself isn't a problem, but the connections are left open with the server returns to life.

Here is detail of connection:

Connection detail

ghost avatar Feb 21 '17 15:02 ghost

I don't know if the problem is located at the AngularStompDK level, inside StompJS or outside of the JS scope.

Do you have an system between your web client and the backend receiving the Stomp request ? Like a reverse proxy (nginx) or something else which retries the connection if they fail too ?

Can you test with the spring project to reproduce this behavior ? Because I won't be able to solve a bug if it's specific to your infrastructure.

If you want to remove this behavior for now, you can configure AngularStompDK to not try to reconnect or to use an bigger interval than default one.

davinkevin avatar Feb 21 '17 15:02 davinkevin

It is just AngularStompDK -> RabbitMQ WebStomp plugin. Amazon AWS is handling SSL into the WebSocket, but I don't think that would be causing this error? I remember it coming up during testing without that, too. I will look at the Spring project as soon as I can, thank you for your help so far!

ghost avatar Feb 21 '17 15:02 ghost